2
using System.Collections.Generic;
10
public ParseNode(Token token, IList<ParseNode> children)
13
this.Kind = ParseNodeKind.Token;
15
this.Children = new ParseNodeCollection(children);
18
public ParseNode(Token token)
21
this.Kind = ParseNodeKind.Token;
26
public ParseNode(ParseNodeKind kind, IList<ParseNode> children)
30
this.Token = Token.Null;
31
this.Children = new ParseNodeCollection(children);
34
public ParseNode(ParseNodeKind kind)
38
this.Token = Token.Null;
39
this.Children = new ParseNodeCollection();
44
this.IsArgument = false;
47
public ParseNodeKind Kind
59
public bool IsArgument
65
public ParseNodeCollection Children
71
public override string ToString()
73
if (this.Kind == ParseNodeKind.Token)
75
return this.Token.ToString();
79
return this.Kind.ToString();
84
public enum ParseNodeKind