public override void EnterHook_definition_clause([NotNull] TxMarkParser.Hook_definition_clauseContext context) { _compileContext.SetLocation(context.Start.Line, context.Start.Column); string hookName; var hookNameContext = context.hookName(); if (hookNameContext != null) { hookName = hookNameContext.word().GetText(); _compileContext.AddNameTag(context, hookName); } else { hookName = this._compileContext.ResolveHookName(context); } _compileContext.Push(CodeContextTypes.HookDefinition, hookName); }
/// <summary> /// Exit a parse tree produced by <see cref="TxMarkParser.hook_definition_clause"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitHook_definition_clause([NotNull] TxMarkParser.Hook_definition_clauseContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="TxMarkParser.hook_definition_clause"/>. /// <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 VisitHook_definition_clause([NotNull] TxMarkParser.Hook_definition_clauseContext context) { return(VisitChildren(context)); }
public override void ExitHook_definition_clause([NotNull] TxMarkParser.Hook_definition_clauseContext context) { _compileContext.Pop(); }