diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-10-17 13:24:54 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:09:35 +0100 |
commit | 311121156e27e156c71bbbe2f12e35b1618ed100 (patch) | |
tree | e4d01c36bc9befaebc7f73da3e4dabfd08fa3a25 /gcc/rust/Make-lang.in | |
parent | 80bdb1a85ac6275eb7cdb963b257ba65168c8eb9 (diff) | |
download | gcc-311121156e27e156c71bbbe2f12e35b1618ed100.zip gcc-311121156e27e156c71bbbe2f12e35b1618ed100.tar.gz gcc-311121156e27e156c71bbbe2f12e35b1618ed100.tar.bz2 |
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 <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/Make-lang.in')
0 files changed, 0 insertions, 0 deletions