예제 #1
0
 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
예제 #2
0
 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
예제 #3
0
 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);
 }
예제 #4
0
 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);
 }