From: Arthur Cohen Date: Mon, 19 Feb 2024 19:41:50 +0000 (+0100) Subject: parser: Add peek(n) method to parser X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38e3cffdbdee48cc4793948f1551b075672f6fdd;p=thirdparty%2Fgcc.git parser: Add peek(n) method to parser gcc/rust/ChangeLog: * parse/rust-parse.h: New method. --- 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.