Esempio n. 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));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="LeafParser.entry_point"/>.
 /// <para>
 /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/>
 /// on <paramref name="context"/>.
 /// </para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 /// <return>The visitor result.</return>
 public virtual Result VisitEntry_point([NotNull] LeafParser.Entry_pointContext context)
 {
     return(VisitChildren(context));
 }