gccrs: Fix float lexing and tuple index disambiguation
commit348f028fc2957d13e828030119938b8fccb00fc3
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 31 Oct 2023 14:23:45 +0000 (31 15:23 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:13:15 +0000 (16 19:13 +0100)
treef7f03d039aa260ecef8a09134f184b9d26f7c71b
parent4bd9f1159ba054c9cacfd9a5cd0186c1791987d1
gccrs: Fix float lexing and tuple index disambiguation

When a float has a floating point but no value after it, a zero was added
this lead to errors when trying to disambiguate a float into a tuple
index.

gcc/rust/ChangeLog:

* lex/rust-lex.cc (Lexer::parse_decimal_int_or_float): Remove
additional zero after empty floating point.
* parse/rust-parse-impl.h (Parser::left_denotation): Handle float with
empty floating point.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/lex/rust-lex.cc
gcc/rust/parse/rust-parse-impl.h