Exemplo n.º 1
0
        public override Symbol VisitTextType([NotNull] PageInterpreterParser.TextTypeContext context)
        {
            for (int i = 0; i < context.Text().Length; i++)
            {
                var textType     = context.Text(i).GetText();
                var pageUnit     = pageTraverser.GetMatchingPageUnit(textType);
                var matchContent = GetTextTypeParameters(context, i);

                if (ValidateTextTypeMatch(pageUnit, textType, matchContent))
                {
                    return(new Symbol(SymbolType.Single, textType));
                }
            }

            throw new ParseCanceledException();
        }
Exemplo n.º 2
0
 private string[] GetTextTypeParameters(PageInterpreterParser.TextTypeContext context, int index)
 => context.textTypeParameters(index) != null
 ? context?.textTypeParameters(index).Accept(this)?.GetValue <string[]>() ?? null
 : null;