Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differentiate documentation from triple slashes and doc attribute #3209

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Oct 18, 2024

  1. Fixes Rust-GCC#3196

    gcc/rust/ChangeLog:
    
    	* ast/rust-ast-collector.cc (TokenCollector::visit): Add behaviour.
    	In Attribute visitor, recognize doc from comment and handle it.
    
    	* ast/rust-ast.h: Changes Attribute constructor and add a boolean
    	in the class for doc comments.
    
    	* lex/rust-token.cc (Token::as_string): Return the correct string
    	for the new DOC_STRING_LITERAL token.
    
    	* lex/rust-token.h (enum PrimitiveCoreType): Add two tokens :
    	DOC_STRING_LITERAL and DOC_END, for pretty-printing purposes.
    	Also modify the string of two previous tokens.
    
    	* parse/rust-parse-impl.h (Parser::parse_inner_attribute):
    	Updates the Attribute constructor call.
    
    	(Parser::parse_outer_attribute): Same as above.
    
    Signed-off-by: lucas.plantrose <[email protected]>
    MajoraSans committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    91d4c03 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    76af4c5 View commit details
    Browse the repository at this point in the history