Пример #1
0
        /// <summary>
        /// Visit a parse tree produced by <see cref="Z80TestParser.testParams"/>.
        /// <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 override object VisitTestParams(Z80TestParser.TestParamsContext context)
        {
            if (IsInvalidContext(context))
            {
                return(null);
            }
            var node = new ParamsNode(context);

            foreach (var id in context.IDENTIFIER())
            {
                node.Ids.Add(new IdentifierNameNode(id));
            }
            return(node);
        }
 /// <summary>
 /// Exit a parse tree produced by <see cref="Z80TestParser.testParams"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitTestParams([NotNull] Z80TestParser.TestParamsContext context)
 {
 }
Пример #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="Z80TestParser.testParams"/>.
 /// <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 VisitTestParams([NotNull] Z80TestParser.TestParamsContext context)
 {
     return(VisitChildren(context));
 }
Пример #4
0
 /// <summary>
 /// Creates a clause with the span defined by the passed context
 /// </summary>
 /// <param name="context">Parser rule context</param>
 public ParamsNode(Z80TestParser.TestParamsContext context) : base(context)
 {
     ParamsKeywordSpan = new TextSpan(context.PARAMS());
     Ids = new List <IdentifierNameNode>();
 }