Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
NotSupportedNode.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 substitute node to use on constructs that are not yet supported by language implementation.
10  // The script would compile Ok but on attempt to evaluate the node would throw a runtime exception
11  public class NotSupportedNode : AstNode {
12  string Name;
13  public override void Init(ParsingContext context, ParseTreeNode treeNode) {
14  base.Init(context, treeNode);
15  Name = treeNode.Term.ToString();
16  AsString = Name + " (not supported)";
17  }
18 
19  public override void EvaluateNode(EvaluationContext context, AstMode mode) {
20  context.ThrowError(Resources.ErrConstructNotSupported, Name);
21  }
22 
23  }//class
24 }
override void EvaluateNode(EvaluationContext context, AstMode mode)
override void Init(ParsingContext context, ParseTreeNode treeNode)
static string ErrConstructNotSupported
Looks up a localized string similar to Construct '{0}' is not supported (yet) by language implementat...