]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix float lexing and tuple index disambiguation
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 31 Oct 2023 14:23:45 +0000 (15:23 +0100)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Wed, 15 Nov 2023 14:32:30 +0000 (14:32 +0000)
commite79301c4be072b5accc7de819a10dc435f4dd253
treed7b0f6abaaa1729afb5e8f856aa419dbff40c4b7
parent31c563737814d98c8c4518e0d93aa65eb44a964c
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