aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-12-17 12:35:44 -0700
committerTom Tromey <tromey@adacore.com>2025-01-06 07:03:40 -0700
commit350609bb98cee92c6b4fbd334b99066683b9e5c1 (patch)
treec39e570d4c52168791b998dfd25fb6ab4579dcc1 /gdb/python
parent03736207c6c81713c9ed749877de1c0e0ff3ffee (diff)
downloadbinutils-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