/// <summary>
        /// Visit a parse tree produced by <see cref="Z80TestParser.dataBlock"/>.
        /// <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 VisitDataBlock(Z80TestParser.DataBlockContext context)
        {
            if (IsInvalidContext(context))
            {
                return(null);
            }
            var node = new DataBlockNode(context);

            foreach (var body in context.dataBlockBody())
            {
                node.DataMembers.Add((DataMemberNode)VisitDataBlockBody(body));
            }
            return(node);
        }
Example #2
0
 /// <summary>
 /// Creates a clause with the span defined by the passed context
 /// </summary>
 /// <param name="context">Parser rule context</param>
 public DataBlockNode(Z80TestParser.DataBlockContext context) : base(context)
 {
     DataKeywordSpan = new TextSpan(context.DATA());
     DataMembers     = new List <DataMemberNode>();
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="Z80TestParser.dataBlock"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitDataBlock([NotNull] Z80TestParser.DataBlockContext context)
 {
 }
Example #4
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="Z80TestParser.dataBlock"/>.
 /// <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 VisitDataBlock([NotNull] Z80TestParser.DataBlockContext context)
 {
     return(VisitChildren(context));
 }