Beispiel #1
0
        public FragmentNode(LeafParser.Entry_pointContext ctx)
        {
            var imports = ctx.ns_import();

            _imports.Capacity = imports.Length;
            foreach (var import in imports)
            {
                AddImport(new ImportNode(import));
            }

            var defs = ctx.def();

            _definitions.Capacity = defs.Length;
            foreach (var def in defs)
            {
                AddDefinition(DefinitionNode.Create(def));
            }
        }
Beispiel #2
0
 public DefinitionNode AddDefinition(DefinitionNode definition)
 {
     definition.Parent = this;
     _definitions.Add(definition);
     return(definition);
 }