gccrs: parser: Add peek(n) method to parser

gcc/rust/ChangeLog:

	* parse/rust-parse.h: New method.
This commit is contained in:
Arthur Cohen 2024-02-19 20:41:50 +01:00
parent 6d8765d071
commit d9fa4153c8

View File

@ -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.