The base-class for all the AST nodes in JSBasic. This is useful only to hold a reference to all the Children, so that the AST tree can be traversed easily using an iterator.
Inheritance: AstNode, IJSBasicNode
Example #1
0
 public LineNode(AstNodeArgs args)
     : base(args)
 {
     LineTypes = LineTypes.InternalLine; // overwritten later by JavaScriptGenerator
     LineNumber = (int)((Token)args.ChildNodes[0]).Value;
     if (args.ChildNodes.Count > 2)
     {
         StatementList = (GenericJsBasicNode)args.ChildNodes[1];
     }
     else
     {
         StatementList = new GenericJsBasicNode(args); //empty node
     }
 }
Example #2
0
 public LineNode(AstNodeArgs args)
     : base(args)
 {
     LineTypes  = LineTypes.InternalLine;            // overwritten later by JavaScriptGenerator
     LineNumber = (int)((Token)args.ChildNodes[0]).Value;
     if (args.ChildNodes.Count > 2)
     {
         StatementList = (GenericJsBasicNode)args.ChildNodes[1];
     }
     else
     {
         StatementList = new GenericJsBasicNode(args);                 //empty node
     }
 }