Skip to content

Commit 38e3cff

Browse files
committed
parser: Add peek(n) method to parser
gcc/rust/ChangeLog: * parse/rust-parse.h: New method.
1 parent d802ca9 commit 38e3cff

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

gcc/rust/parse/rust-parse.h

+1
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ template <typename ManagedTokenSource> class Parser
725725
const ManagedTokenSource &get_token_source () const { return lexer; }
726726

727727
const_TokenPtr peek_current_token () { return lexer.peek_token (0); }
728+
const_TokenPtr peek (int n) { return lexer.peek_token (n); }
728729

729730
private:
730731
// The token source (usually lexer) associated with the parser.

0 commit comments

Comments
 (0)