Antlr4.StringTemplate.Compiler.TemplateLexer.MatchEscape C# (CSharp) Метод

MatchEscape() приватный Метод

private MatchEscape ( ) : IToken
Результат IToken
        private IToken MatchEscape()
        {
            startCharIndex = input.Index;
            startCharPositionInLine = input.CharPositionInLine;
            Consume(); // kill \\
            if (c == 'u')
                return MatchUnicode();

            string text;
            switch (c)
            {
            case '\\':
                ConsumeLineBreak();
                return SkipToken;

            case 'n':
                text = "\n";
                break;

            case 't':
                text = "\t";
                break;

            case ' ':
                text = " ";
                break;

            default:
                NoViableAltException e = new NoViableAltException(string.Empty, 0, 0, input);
                errMgr.LexerError(input.SourceName, string.Format("invalid escaped char: '{0}'", GetCharString(c)), templateToken, e);
                Consume();
                Match(delimiterStopChar);
                return SkipToken;
            }

            Consume();
            IToken t = NewToken(TEXT, text, input.CharPositionInLine - 2);
            Match(delimiterStopChar);
            return t;
        }