forked from Rust-GCC/gccrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gccrs: Fix token lexed as a float literal
The lexer cannot distinguish the difference between a float literal and a tuple index in some cases. This means we should fix this while parsing depending on the context. gcc/rust/ChangeLog: * expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::split_current_token): Add implementation for multiple token split. * expand/rust-macro-invoc-lexer.h: Add function prototype. * expand/rust-proc-macro-invoc-lexer.cc (ProcMacroInvocLexer::split_current_token): Add implementation for 2+ token split for procedural macros. * expand/rust-proc-macro-invoc-lexer.h: Add function prototype. * lex/rust-lex.cc (Lexer::split_current_token): Add function to split a token in multiple other tokens. * lex/rust-lex.h: Add function prototype for split_current_token. * parse/rust-parse-impl.h (Parser::left_denotation): Handle float tuple index identified as a float literal. Signed-off-by: Pierre-Emmanuel Patry <[email protected]>
- Loading branch information
1 parent
364de75
commit 11d33ad
Showing
7 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters