// parsing the header tags // will not enter if there aren't any public override void EnterHeader_tag(YarnSpinnerParser.Header_tagContext context) { var tags = new List<string>(context.TAG_TEXT().GetText().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)); // if the node is to be parsed as raw text // ie just straight passthrough // this is for things like if you want to store books in YarnSpinner if (tags.Contains("rawText")) { rawTextNode = true; } // storing the tags in the node currentNode.tags = tags; }
/// <summary> /// Visit a parse tree produced by <see cref="YarnSpinnerParser.header_tag"/>. /// <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 VisitHeader_tag([NotNull] YarnSpinnerParser.Header_tagContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="YarnSpinnerParser.header_tag"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitHeader_tag([NotNull] YarnSpinnerParser.Header_tagContext context) { }