public override void ExitHtmlOpenTag([NotNull] TxMarkParser.HtmlOpenTagContext context) { //In this special case the CloseTagContext will pop the matching tag context via ICodeContext.PopTag() when it exits if (context.SLASH() != null) { _compileContext.Pop(); } }
public override void EnterHtmlOpenTag([NotNull] TxMarkParser.HtmlOpenTagContext context) { AddTag(context.LESS_THAN().Symbol, Classify("HTML Tag Delimiter")); if (context.SLASH() != null) { AddTag(context.SLASH().Symbol, Classify("HTML Tag Delimiter")); } AddTag(context.word().WORD().Symbol, Classify("HTML Element Name")); AddTag(context.GREATER_THAN().Symbol, Classify("HTML Tag Delimiter")); }
/// <summary> /// Exit a parse tree produced by <see cref="TxMarkParser.htmlOpenTag"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitHtmlOpenTag([NotNull] TxMarkParser.HtmlOpenTagContext context) { }
/// <summary> /// Visit a parse tree produced by <see cref="TxMarkParser.htmlOpenTag"/>. /// <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 VisitHtmlOpenTag([NotNull] TxMarkParser.HtmlOpenTagContext context) { return(VisitChildren(context)); }
public override void EnterHtmlOpenTag([NotNull] TxMarkParser.HtmlOpenTagContext context) { _compileContext.SetLocation(context.Start.Line, context.Start.Column); _compileContext.Push(CodeContextTypes.TagOpen, context.word().GetText(), new Bag <string>().Set <bool>("closing", context.SLASH() != null)); }