aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-02-19 20:41:50 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-03-01 15:42:36 +0000
commit38e3cffdbdee48cc4793948f1551b075672f6fdd (patch)
treee553efcfdfdca3f639c666f58ff77b6dbdbac0aa /gcc/rust/parse/rust-parse.h
parentd802ca9c0547f5640b274ce534942b7d81a78e44 (diff)
downloadgcc-38e3cffdbdee48cc4793948f1551b075672f6fdd.zip
gcc-38e3cffdbdee48cc4793948f1551b075672f6fdd.tar.gz
gcc-38e3cffdbdee48cc4793948f1551b075672f6fdd.tar.bz2
parser: Add peek(n) method to parser
gcc/rust/ChangeLog: * parse/rust-parse.h: New method.
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-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.