public override void EnterHook([NotNull] TxMarkParser.HookContext context)
        {
            _compileContext.SetLocation(context.Start.Line, context.Start.Column);
            var hookName = _compileContext.ResolveHookName(context.Parent);

            _compileContext.Push(CodeContextTypes.Hook, hookName);
        }
 /// <summary>
 /// Exit a parse tree produced by <see cref="TxMarkParser.hook"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitHook([NotNull] TxMarkParser.HookContext context)
 {
 }
Exemple #3
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="TxMarkParser.hook"/>.
 /// <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([NotNull] TxMarkParser.HookContext context)
 {
     return(VisitChildren(context));
 }
 public override void ExitHook([NotNull] TxMarkParser.HookContext context)
 {
     _compileContext.PopTo(CodeContextTypes.Hook);
     _compileContext.Pop();
 }
 public override void EnterHook([NotNull] TxMarkParser.HookContext context)
 {
     AddTag(context.OPEN_HOOK().Symbol, Classify("HTML Tag Delimiter"));
     AddTag(context.CLOSE_HOOK().Symbol, Classify("HTML Tag Delimiter"));
 }