public ExecutionVisitor(Dictionary <string, IProperty> symbolicTable, IPrinter printer, IReader reader) { this.symbolTable = symbolicTable; this.evaluator = new EvaluationVisitor(this.symbolTable); // used for evaluating expressions this.voidProperty = new VoidProperty(); this.printer = printer; this.reader = reader; }
/// <summary> /// Initializes a new instance of the <see cref="MiniPLInterpreter.StatementCheckVisitor"/> class. /// </summary> /// <param name="analyzer">Analyzer.</param> public StatementCheckVisitor(SemanticAnalyzer analyzer) { this.analyzer = analyzer; this.typeChecker = new TypeCheckingVisitor(analyzer); // We tend to return a lot of VoidProperties here, // but since we don't do anything with them, we // use one global VoidProperty object and pass it // anytime we need to pass one. this.voidProperty = new VoidProperty(); }
public EvaluationVisitor(Dictionary <string, IProperty> symbolTable) { this.symbolTable = symbolTable; this.voidProperty = new VoidProperty(); }
private VoidProperty voidProperty; // as with the StatementCheckVisitor, use this to pass all voids public TypeCheckingVisitor(SemanticAnalyzer analyzer) { this.analyzer = analyzer; this.voidProperty = new VoidProperty(); }