Token Consume(TokenKind kind) { Token old = current; current = lexer.Next(); if (old.TokenKind != kind) throw new ParseException("Unexpected token: " + current.TokenKind.ToString() + ". Was expecting: " + kind , current.Line, current.Col); return old; }
Token Consume() { Token old = current; current = lexer.Next(); return old; }