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(); }
private string[] GetTextTypeParameters(PageInterpreterParser.TextTypeContext context, int index) => context.textTypeParameters(index) != null ? context?.textTypeParameters(index).Accept(this)?.GetValue <string[]>() ?? null : null;