public static string Consume(this AbstractLexer lexer, params TokenKind[] kinds) { lexer.VerifyToken(kinds); var result = lexer.Token.Text; lexer.Advance(); return(result); }
public static string Consume(this AbstractLexer lexer, TokenKind kind, string text = null) { lexer.VerifyToken(kind, text); var result = lexer.Token.Text; lexer.Advance(); return(result); }