private bool consumeToken(Dictionary.LexemeType type, string exceptionMessage) { if (tokenType() == type) { lexer.consume(); return(true); } throw new Exception(exceptionMessage + pos()); }
public Token(Dictionary.LexemeType t, string v, Position p) { type = t; value = v; position = p; }