Exemple #1
0
        public Interpreter(AbstractSyntaxTree ast)
        {
            this.ast = ast;
            rootEnv  = new InterpreterEnvironment();

            // Register built-in functions as symbols in the root environment
            DefineBuiltInFunctions();
        }
Exemple #2
0
 public InterpreterEnvironment(InterpreterEnvironment parent)
 {
     HasParent = true;
     Parent    = parent;
     Symbols   = new Dictionary <string, IExpression>();
 }
Exemple #3
0
 public InterpreterEnvironment()
 {
     HasParent = false;
     Parent    = null;
     Symbols   = new Dictionary <string, IExpression>();
 }