public void Parse_FieldInstruction_Player2Array() { var act = Instruction.Parse("update player2 field 0,1,2,2;0,0,0,2;3,3,3,3"); var exp = new FieldInstruction(PlayerName.Player2, new int[, ] { { 0, 1, 2, 2 }, { 0, 0, 0, 2 }, { 3, 3, 3, 3 }, }); Assert.AreEqual(exp.ToString(), act.ToString()); }
public virtual void VisitField(FieldInstruction x) { x.ThisObject.VisitMe(this); VisitInstruction(x); }
public override void VisitField(FieldInstruction x) { var thisObj = getValue(x.ThisObject); emit(Expression.Field(thisObj, x.Field)); }