// BoundAssignment private void DefaultWalk(BoundAssignment node) { if (Walk(node)) { WalkNode(node.Value); } PostWalk(node); }
// BoundAssignment private Expression Rewrite(BoundAssignment node) { Expression value = RewriteExpression(node.Value); if ((object)value != (object)node.Value) { return(Ast.Assign(node.Variable, value)); } else { return(node); } }
protected override object DoExecute(CodeContext context) { bool rethrow = false; Exception savedExc = null; object ret = Statement.NextStatement; try { ret = _body.Execute(context); } catch (Exception exc) { rethrow = true; savedExc = exc; if (_handlers != null) { PushEvalException(exc); try { foreach (CatchBlock handler in _handlers) { if (handler.Test.IsInstanceOfType(exc)) { rethrow = false; if (handler.Variable != null) { BoundAssignment.EvaluateAssign(context, handler.Variable, exc); } ret = handler.Body.Execute(context); break; } } } finally { PopEvalException(); } } } finally { if (_finally != null) { object finallyRet = _finally.Execute(context); if (finallyRet != Statement.NextStatement) { ret = finallyRet; rethrow = false; } } if (rethrow) { throw ExceptionHelpers.UpdateForRethrow(savedExc); } } return(ret); }
protected internal override bool Walk(BoundAssignment node) { node.Ref = Reference(node.Variable); return(true); }
protected internal override bool Walk(BoundAssignment node) { node.Ref = Reference(node.Variable); return true; }
// BoundAssignment protected internal override bool Walk(BoundAssignment node) { WalkNode(node.Value); Define(node.Variable); return false; }
// BoundAssignment protected internal override bool Walk(BoundAssignment node) { WalkNode(node.Value); Define(node.Variable); return(false); }
protected override void PostWalk(BoundAssignment node) { base.PostWalk(node); var val = node.Value; var var = node.Variable; val = ProcessAssignment(val, var); node.Value = val; }
protected override bool Walk(BoundAssignment node) { var val = node.Value; var var = node.Variable; ProcessAssignment(val, var, true); return base.Walk(node); }
protected internal override bool Walk(BoundAssignment node) { node.Ref = GetOrMakeRef(node.Variable); return true; }
internal override object EvaluateAssign(CodeContext context, object value) { return(BoundAssignment.EvaluateAssign(context, Variable, value)); }
// BoundAssignment private void Dump(BoundAssignment node) { Out("(.bound " + SymbolTable.IdToString(node.Variable.Name) + ") = "); WalkNode(node.Value); }