Пример #1
0
        IScannerState IScannerState.Read(TokenConstruction Current, char Read, StateStorage States)
        {
            switch (Read)
            {
            case 'a':
                Current.Append('\a');
                return(States.StringLiteral);

            case 'n':
                Current.AppendNewLine();
                return(States.StringLiteral);

            case '"':
                Current.End(Symbol.StringLiteral);
                return(States.Base);

            case '\\':
                Current.Append('\\');
                return(States.StringLiteral);

            default:
                Current.Append('\\');
                return(States.StringLiteral.Read(Current, Read, States));
            }
        }