Exemplo n.º 1
0
        public override CSharpSyntaxNode VisitFile([NotNull] DonatelloParser.FileContext context)
        {
            var children = context.form()
                           .Select(f => this.Visit(f))
                           .ToArray();

            if (repl)
            {
                return(children.First());
            }

            return(CreateClass(children));
        }
 /// <summary>
 /// Exit a parse tree produced by <see cref="DonatelloParser.file"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitFile([NotNull] DonatelloParser.FileContext context)
 {
 }
 /// <summary>
 /// Visit a parse tree produced by <see cref="DonatelloParser.file"/>.
 /// <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 VisitFile([NotNull] DonatelloParser.FileContext context)
 {
     return(VisitChildren(context));
 }