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