Ejemplo n.º 1
0
        // 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;
        }
Ejemplo n.º 2
0
 // 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();
 }