/// <summary> /// Visit a parse tree produced by <see cref="Z80TestParser.cleanupCode"/>. /// <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 VisitCleanupCode(Z80TestParser.CleanupCodeContext context) { if (IsInvalidContext(context)) { return(null); } var node = (InvokeCodeNode)VisitInvokeCode(context.invokeCode()); if (node != null) { node.KeywordSpan = new TextSpan(context.CLEANUP()); node.Span = new TextSpan( node.KeywordSpan.StartLine, node.KeywordSpan.StartColumn, node.Span.EndLine, node.Span.EndColumn); } return(node); }
/// <summary> /// Exit a parse tree produced by <see cref="Z80TestParser.cleanupCode"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitCleanupCode([NotNull] Z80TestParser.CleanupCodeContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="Z80TestParser.cleanupCode"/>. /// <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 VisitCleanupCode([NotNull] Z80TestParser.CleanupCodeContext context) { return(VisitChildren(context)); }