]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add Rust parser check for end of expression
authorTom Tromey <tom@tromey.com>
Fri, 18 Mar 2022 04:36:12 +0000 (22:36 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 28 Mar 2022 21:02:52 +0000 (15:02 -0600)
commitf77c52719df41f5f5cf34b7ba1ae9f591f0b0bf5
tree3c2036cd9465af995c16e0aa1c95b378743ebb73
parent52a4a5885af15e7ef32d5f4e5b77f98349c32276
Add Rust parser check for end of expression

I noticed that "print 5," passed in Rust -- the parser wasn't checking
that the entire input was used.  This patch fixes the problem.  This
in turn pointed out another bug in the parser, namely that it didn't
lex the next token after handling a string token.  This is also fixed
here.
gdb/rust-parse.c
gdb/testsuite/gdb.rust/expr.exp