internal IBlock TakeoutArg(InvokationBlock parent, int i) { IBlock arg = parent.Args[i]; parent.SetArg(i, Default(parent.ArgTypes[i])); return(arg); }
public void DetachArgument(InvokationBlock b, int i, Point newLocation) { IBlock oldArg = b.Args[i]; b.SetArg(i, Default(b.ArgTypes[i])); oldArg.ParentRelationship = new ParentRelationship(); AddScript(new TopLevelScript(newLocation, oldArg, this)); }
public void DetachArgument(InvokationBlock b, int i, Point newLocation) { IBlock oldArg = b.Args[i]; b.SetArg(i, Default(b.ArgTypes[i])); oldArg.ParentRelationship = new ParentRelationship(); AddScript(new TopLevelScript(newLocation, oldArg, this)); }
public IBlock DeepClone() { InvokationBlock ret = new InvokationBlock(Text, Attributes, ArgTypes, ReturnType); int i = 0; foreach (IBlock arg in Args) { ret.SetArg(i, arg.DeepClone()); } return(ret); }
internal void Detach(BlockSpace blockSpace) { if (Parent is InvokationBlock) { InvokationBlock ib = Parent as InvokationBlock; ib.SetArg(Index, blockSpace.Default(ib.ArgTypes[Index])); } else if (Parent is BlockStack) { throw new InvalidOperationException(); } }
public IBlock DeepClone() { InvokationBlock ret = new InvokationBlock(Text, Attributes, ArgTypes, ReturnType); int i = 0; foreach (IBlock arg in Args) { ret.SetArg(i, arg.DeepClone()); } return ret; }
internal IBlock TakeoutArg(InvokationBlock parent, int i) { IBlock arg = parent.Args[i]; parent.SetArg(i, Default(parent.ArgTypes[i])); return arg; }