Ejemplo n.º 1
0
        private static void ResolveQuotedString(LexerContext context, StringBuilder builder)
        {
            context.IncIndex();

            while (!context.IsEnded() && StringToken.IsStringSymbol(context.GetCurrentChar()))
            {
                if (context.GetCurrentChar().Equals('\''))
                {
                    if (StringToken.IsDoubleQuote(context))
                    {
                        builder.Append('\'');
                        context.IncIndex();
                        context.IncIndex();
                    }
                    else
                    {
                        context.IncIndex();
                        return;
                    }
                }
                builder.Append(context.GetCurrentChar());
                context.IncIndex();
            }
        }