public override void VisitAssignExpression (AssignExpression node) { Console.Write ("assign "); Visit (node.Expression); Console.Write (" to "); Visit (node.Target); Console.WriteLine (); }
public override ICodeNode VisitAssignExpression (AssignExpression node) { var result = Pattern.CodePattern.Match (SelfAssignmentPattern, node); if (!result.Success) return base.VisitAssignExpression (node); var target = (Expression) result [TargetKey]; var @operator = (BinaryOperator) result [OperatorKey]; switch (@operator) { case BinaryOperator.Add: case BinaryOperator.Subtract: return new UnaryExpression ( GetCorrespondingOperator (@operator), target); default: return base.VisitAssignExpression (node); } }
public void EmitAssignExpression(AssignExpression node, int si) { EmitExpression(node.Expression, si); this.Text.Emit("movl %eax, {0}(%ebp)", LookupVariable(node.Target)); }
public virtual ICodeNode VisitAssignExpression(AssignExpression node) { node.Target = (Expression)Visit(node.Target); node.Expression = (Expression)Visit(node.Expression); return(node); }
public override void VisitAssignExpression (AssignExpression node) { Write (node.Target); WriteTokenBetweenSpace ("="); Write (node.Expression); }
public override ICodeNode VisitAssignExpression(AssignExpression node) { node = (AssignExpression)base.VisitAssignExpression(node); return new TypedAssignExpression(node.Target, node.Expression); }
public virtual void VisitAssignExpression (AssignExpression node) { Visit (node.Target); Visit (node.Expression); }
public static void Main () { var assign = new AssignExpression (new BarExpression (), new FooExpression ()); var printer = new FooPrinter (); printer.Visit (assign); }
public virtual void VisitAssignExpression(AssignExpression node) { Visit(node.Target); Visit(node.Expression); }