https://gcc.gnu.org/g:38e3cffdbdee48cc4793948f1551b075672f6fdd
commit 38e3cffdbdee48cc4793948f1551b075672f6fdd Author: Arthur Cohen <arthur.co...@embecosm.com> Date: Mon Feb 19 20:41:50 2024 +0100 parser: Add peek(n) method to parser gcc/rust/ChangeLog: * parse/rust-parse.h: New method. Diff: --- gcc/rust/parse/rust-parse.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h index 1614d19e4a5b..8c8bf96eb8d0 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.