System.Data.Common.EntitySql.CqlLexer.IsNewLine(System.Char)

Here are the examples of the csharp api class System.Data.Common.EntitySql.CqlLexer.IsNewLine(System.Char) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: referencesource
Source File: CqlLexerHelpers.cs
View license
internal static char translate(char c)
            #region TRANSLATE
            {
                if (Char.IsWhiteSpace(c) || Char.IsControl(c))
                {
                    if (IsNewLine(c))
                    {
                        return '\n';
                    }
                    return ' ';
                }

                if (c < 0x007F)
                {
                    return c;
                }

                if (Char.IsLetter(c) || Char.IsSymbol(c) || Char.IsNumber(c))
                {
                    return 'a';
                }

                //
                // otherwise pass dummy 'marker' char so as we can continue 'extracting' tokens.
                // 
                return '`';
            }

2. Example

Project: referencesource
Source File: CqlLexerHelpers.cs
View license
private Char GetLookAheadChar()
        {
            yy_mark_end();
            Char lookAheadChar = yy_advance();
            while (lookAheadChar != YY_EOF && (Char.IsWhiteSpace(lookAheadChar) || IsNewLine(lookAheadChar)))
            {
                lookAheadChar = yy_advance();
            }
            yy_to_mark();
            return lookAheadChar;
        }