aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-02-19 20:41:50 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-08-01 13:11:30 +0200
commitd9fa4153c83d3a4e4099530a450c7e511b1b24ec (patch)
treef4778d68f7d8e0bad0ffcf58e7f080580aa69877 /gcc/rust/parse
parent6d8765d0719018730dea2d118a1fc0ca87c8960a (diff)
downloadgcc-d9fa4153c83d3a4e4099530a450c7e511b1b24ec.zip
gcc-d9fa4153c83d3a4e4099530a450c7e511b1b24ec.tar.gz
gcc-d9fa4153c83d3a4e4099530a450c7e511b1b24ec.tar.bz2
gccrs: parser: Add peek(n) method to parser
gcc/rust/ChangeLog: * parse/rust-parse.h: New method.
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r--gcc/rust/parse/rust-parse.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 1614d19..8c8bf96 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -725,6 +725,7 @@ public:
const ManagedTokenSource &get_token_source () const { return lexer; }
const_TokenPtr peek_current_token () { return lexer.peek_token (0); }
+ const_TokenPtr peek (int n) { return lexer.peek_token (n); }
private:
// The token source (usually lexer) associated with the parser.