public override void Init(AstContext context, ParseTreeNode treeNode) { base.Init(context, treeNode); _head = AddChild(string.Empty, treeNode.ChildNodes[0]); _args = AddChild(string.Empty, treeNode.ChildNodes[1]) as MtExpressionList; AsString = "Application"; }
public override AstNode ToTS() { var x = new MtExpressionList(); x._args = new List<AstNode>(); foreach(var a in _args) { x._args.Add(a.ConvertToTS()); } return x; }
public override AstNode ToTS() { var x = new MtExpressionList(); x._args = new List <AstNode>(); foreach (var a in _args) { x._args.Add(a.ConvertToTS()); } return(x); }
public override void Init(Irony.Ast.AstContext context, Irony.Parsing.ParseTreeNode treeNode) { base.Init(context, treeNode); if (treeNode.ChildNodes.Count != 1) { throw new Exception("Expected 1 child, received {0}".SafeFormat(treeNode.ChildNodes.Count)); } _expressionList = AddChild(string.Empty, treeNode.ChildNodes[0]) as MtExpressionList; if (_expressionList == null) { throw new Exception("Child should be a MtExpressionList!"); } }