Esempio n. 1
0
 private void InitImpl(Irony.Ast.AstContext context, ParseTreeNode node, ParseTreeNode parameters, ParseTreeNode body)
 {
     base.Init(context, node);
     lock (lockObject)
     {
         Parameters = AddChild("Parameters", parameters) as ParamListNode;
     }
     Body     = AddChild("Body", body);
     AsString = "Lambda[" + Parameters.ChildNodes.Count + "]";
 }
Esempio n. 2
0
        public override void Init(Irony.Ast.AstContext context, ParseTreeNode parseNode)
        {
            base.Init(context, parseNode);
            var nodes = parseNode.GetMappedChildNodes();

            target      = AddChild("Target", nodes[1]) as IdentifierNode;
            parameters  = AddChild("Parameters", nodes[2]) as ParamListNode;
            isExtension = string.Equals(nodes[3].FindTokenAndGetText(), "extension", StringComparison.CurrentCultureIgnoreCase);

            AsString = "<extern " + (isExtension ? "Extension " : "") + "Function " + target.AsString + "[" + parameters.ChildNodes.Count + "]>";
        }