diff options
author | Tom Tromey <tromey@adacore.com> | 2024-12-17 12:35:44 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-01-06 07:03:40 -0700 |
commit | 350609bb98cee92c6b4fbd334b99066683b9e5c1 (patch) | |
tree | c39e570d4c52168791b998dfd25fb6ab4579dcc1 /gdb/python | |
parent | 03736207c6c81713c9ed749877de1c0e0ff3ffee (diff) | |
download | binutils-350609bb98cee92c6b4fbd334b99066683b9e5c1.zip binutils-350609bb98cee92c6b4fbd334b99066683b9e5c1.tar.gz binutils-350609bb98cee92c6b4fbd334b99066683b9e5c1.tar.bz2 |
Don't lex floating-point number in Rust field expression
Consider this Rust tuple:
let tuple_tuple = ((23i32, 24i32), 25i32);
Here, the value is a tuple whose first element is also a tuple.
You should be able to print this with:
(gdb) print tuple_tuple.0.1
However, currently the Rust lexer sees "0.1" as a floating-point
number.
This patch fixes the problem by introducing a special case in the
lexer: when parsing a field expression, the parser informs the lexer
that a number should be handled as a decimal integer only.
This change then lets us remove the decimal integer special case from
lex_number.
v2: I realized that the other DECIMAL_INTEGER cases aren't needed any
more.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32472
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions