// all we need to do is store the title as the name of the node public override void EnterHeader_title(YarnSpinnerParser.Header_titleContext context) { var nodeTitle = context.TITLE_TEXT().GetText().Trim(); if (invalidNodeTitleNameRegex.IsMatch(nodeTitle)) { // this node title contains illegal characters throw new ParseException($"The node '{nodeTitle}' contains illegal characters in its title."); } currentNode.Name = nodeTitle; }
public override void EnterHeader_title(YarnSpinnerParser.Header_titleContext context) { currentNode = context.HEADER_TITLE().GetText(); graph.nodes.Add(currentNode); }
// all we need to do is store the title as the name of the node public override void EnterHeader_title(YarnSpinnerParser.Header_titleContext context) { currentNode.name = context.TITLE_TEXT().GetText().Trim(); }
/// <summary> /// Visit a parse tree produced by <see cref="YarnSpinnerParser.header_title"/>. /// <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_title([NotNull] YarnSpinnerParser.Header_titleContext context) { return(VisitChildren(context)); }
/// <summary> /// Enter a parse tree produced by <see cref="YarnSpinnerParser.header_title"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void EnterHeader_title([NotNull] YarnSpinnerParser.Header_titleContext context) { }