public FunctionCallNode(NodeArgs args, VarRefNode name, AstNodeList arguments) : base(args) { ChildNodes.Clear(); NameRef = name; NameRef.Flags |= AstNodeFlags.SuppressNotDefined; AddChild("Name", NameRef); Arguments = arguments; foreach (AstNode arg in Arguments) AddChild("Arg", arg); }//constructor
public FunctionCallNode(NodeArgs args, VarRefNode name, AstNodeList arguments) : base(args) { ChildNodes.Clear(); NameRef = name; NameRef.Flags |= AstNodeFlags.SuppressNotDefined; AddChild("Name", NameRef); Arguments = arguments; foreach (AstNode arg in Arguments) { AddChild("Arg", arg); } }//constructor
public AssigmentNode(NodeArgs args, AstNode id, AstNode expression) : base(args) { ChildNodes.Clear(); Identifier = id as VarRefNode; if (Identifier == null) //id might be a simple token Identifier = new VarRefNode(args, id); if (Identifier == null && id is Token) { args.Context.ReportError(id.Location, "Expected identifier."); } Identifier.Flags |= AstNodeFlags.AllocateSlot | AstNodeFlags.NotRValue; Identifier.Access = AccessType.Write; AddChild("Name", Identifier); Expression = expression; AddChild("Expr", Expression); }
public AssigmentNode(NodeArgs args, AstNode id, AstNode expression) : base(args) { ChildNodes.Clear(); Identifier = id as VarRefNode; if (Identifier == null) //id might be a simple token { Identifier = new VarRefNode(args, id); } if (Identifier == null && id is Token) { args.Context.ReportError(id.Location, "Expected identifier."); } Identifier.Flags |= AstNodeFlags.AllocateSlot | AstNodeFlags.NotRValue; Identifier.Access = AccessType.Write; AddChild("Name", Identifier); Expression = expression; AddChild("Expr", Expression); }