Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NullNode.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using Irony.Parsing;
6 using Irony.Interpreter;
7 
8 namespace Irony.Interpreter.Ast {
9  //A stub to use when AST node was not created (type not specified on NonTerminal, or error on creation)
10  // The purpose of the stub is to throw a meaningful message when interpreter tries to evaluate null node.
11  public class NullNode : AstNode {
12 
13  public NullNode(BnfTerm term) {
14  this.Term = term;
15  }
16 
17  public override void Evaluate(EvaluationContext context, AstMode mode) {
18  context.ThrowError(Resources.ErrNullNodeEval, this.Term);
19  }
20  }//class
21 }
override void Evaluate(EvaluationContext context, AstMode mode)
Definition: NullNode.cs:17
static string ErrNullNodeEval
Looks up a localized string similar to Attempt to evaluate NULL AST node. The AST node for term '{0}'...