Inheritance: ICloneable, IEnumerable
示例#1
0
文件: statement.cs 项目: shugo/babel
 public IfStatement(Expression test,
                    Node thenPart,
                    Node elsePart,
                    Location location)
     : base(location)
 {
     this.test = test;
     this.thenPart = thenPart;
     this.elsePart = elsePart;
 }
示例#2
0
文件: expression.cs 项目: shugo/babel
 public IfExpression(Expression test,
                     Node thenPart,
                     Node elsePart,
                     Location location)
     : base(location)
 {
     ifStatement = new IfStatement(test, thenPart, elsePart, location);
 }
示例#3
0
文件: node.cs 项目: shugo/babel
 public NodeList(Node first)
 {
     this.first = first;
 }
示例#4
0
文件: node.cs 项目: shugo/babel
 public virtual void Append(Node node)
 {
     if (first == null) {
         first = node;
     }
     else {
         first.Append(node);
     }
 }
示例#5
0
文件: node.cs 项目: shugo/babel
 public virtual void Reset()
 {
     current = null;
 }
示例#6
0
文件: node.cs 项目: shugo/babel
 public NodeList()
 {
     first = null;
 }
示例#7
0
文件: node.cs 项目: shugo/babel
 public virtual bool MoveNext()
 {
     if (current == null) {
         if (first == null)
             return false;
         current = first;
         return true;
     }
     if (current.Next == null)
         return false;
     current = current.Next;
     return true;
 }
示例#8
0
文件: node.cs 项目: shugo/babel
 public NodeEnumerator(Node node)
 {
     first = node;
     current = null;
 }
示例#9
0
文件: node.cs 项目: shugo/babel
 public virtual void Insert(Node node)
 {
     node.Next = Next;
     Next = node;
 }
示例#10
0
文件: node.cs 项目: shugo/babel
 public virtual void Append(Node node)
 {
     Last.Next = node;
 }
示例#11
0
文件: node.cs 项目: shugo/babel
 public virtual void AddChild(Node node)
 {
     children.Append(node);
 }