public override ProgNodeValue Evaluate(ProgNodeContext context) { ProgNodeValue value = expression.Evaluate(context); context.SymTable.Assign(variable, value, 0); return(null); }
/***************************/ /*** Protected Functions ***/ /***************************/ public override ProgNodeValue Evaluate(ProgNodeContext context) { ProgNodeValue left = leftExp.Evaluate(context); ProgNodeValue right = rightExp.Evaluate(context); int type = GetBoxType(left, right); return(ExecBoxing(left, right, type)); }
public override ProgNodeValue Evaluate(ProgNodeContext context) { while (expression.Evaluate(context).GetBoolean()) { codeBlock.Evaluate(context); } return(null); }
/*******************/ /*** Constructor ***/ /*******************/ public Script(Parser parser) { this.parser = parser; while (!parser.IsEof()) { ProgNode node = GetCommand(); if (!errorSwitch) { ProgNodeContext context = new ProgNodeContext(); node.Evaluate(context); } } }