]> 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:19:47 +0000 (15:19 -0600)
commit7685884a38572266216f12069e86f9c7fcdedc14
treef1ecea811af8b44d2144325b9d54e2e8267b307a
parenteb3ec1b698275299fe59a9d2268208aaa8277728
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