Example #1
0
 /// <summary>
 /// Parses the NUMBER Production Rule
 ///   NUMBER: [0-9]+
 /// </summary>
 /// <returns></returns>
 private bool TryParseNumber(out ASTNode node)
 {
     node = null;
     if (IsNext(Token.TokenType.Number))
     {
         node = new NumberASTNode(Accept( ));
     }
     return(node != null);
 }
Example #2
0
 protected double Evaluate(NumberASTNode node) => node.Value;
Example #3
0
 protected int Evaluate(NumberASTNode node) => node.Value;