/// <summary> /// Visit a parse tree produced by <see cref="Z80TestParser.addrSpec"/>. /// <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 VisitAddrSpec(Z80TestParser.AddrSpecContext context) { if (IsInvalidContext(context)) { return(null); } var startExpr = (ExpressionNode)VisitExpr(context.expr()[0]); var endExpr = context.expr().Length > 1 ? (ExpressionNode)VisitExpr(context.expr()[1]) : null; return(new AddressRangeNode(context, startExpr, endExpr)); }
/// <summary> /// Exit a parse tree produced by <see cref="Z80TestParser.addrSpec"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitAddrSpec([NotNull] Z80TestParser.AddrSpecContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="Z80TestParser.addrSpec"/>. /// <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 VisitAddrSpec([NotNull] Z80TestParser.AddrSpecContext context) { return(VisitChildren(context)); }