129 references to PeekChar
Microsoft.CodeAnalysis.CSharp (129)
Parser\Lexer.cs (91)
452character = TextWindow.PeekChar(); 480var priorCharacterIsDot = this.TextWindow.PeekChar() is '.'; 634Debug.Assert(TextWindow.PeekChar() == '@'); 726if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.PeekChar())) 758Debug.Assert(TextWindow.PeekChar() == '@'); 784Debug.Assert(TextWindow.PeekChar() == '$'); 812while (TextWindow.PeekChar() is >= '0' and <= '9') 823if (TextWindow.PeekChar() == '_') 838char ch = TextWindow.PeekChar(); 881ch = TextWindow.PeekChar(); 904if (TextWindow.PeekChar() is 'L' or 'l') 908if (TextWindow.PeekChar() is 'u' or 'U') 914else if (TextWindow.PeekChar() is 'u' or 'U') 918if (TextWindow.PeekChar() is 'L' or 'l') 929if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 939if ((ch = TextWindow.PeekChar()) == '.') 958if ((ch = TextWindow.PeekChar()) is 'E' or 'e') 963if ((ch = TextWindow.PeekChar()) is '-' or '+') 969if (!(((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') || ch == '_')) 982ch = TextWindow.PeekChar(); 1024if (TextWindow.PeekChar() is 'u' or 'U') 1034if (TextWindow.PeekChar() is 'L' or 'l') 1450while (TextWindow.PeekChar() == '@') 1463char ch = TextWindow.PeekChar(); 1685if (TextWindow.PeekChar() == '&') 1717TextWindow.PeekChar() is 'u' or 'U') 1903char ch = TextWindow.PeekChar(); 2126var startCh = this.TextWindow.PeekChar(); 2152var ch = this.TextWindow.PeekChar(); 2190while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2205var ch = this.TextWindow.PeekChar(); 2235Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*'); 2241if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2262while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2276switch (ch = TextWindow.PeekChar()) 2305char ch = TextWindow.PeekChar(); 2413if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2453char ch = TextWindow.PeekChar(); 2520var ch = this.TextWindow.PeekChar(); 2579switch (character = TextWindow.PeekChar()) 2628if (TextWindow.PeekChar() == '=') 2642if (TextWindow.PeekChar() == '=') 2781char ch = TextWindow.PeekChar(); 2835Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2880switch (ch = TextWindow.PeekChar()) 2930Debug.Assert(TextWindow.PeekChar() == '<'); 2979Debug.Assert(TextWindow.PeekChar() == '&'); 2986if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2988while (IsXmlNameChar(ch = TextWindow.PeekChar())) 3026bool isHex = TextWindow.PeekChar() == 'x'; 3032while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3045while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3057if (TextWindow.PeekChar() != ';') 3102ch = TextWindow.PeekChar(); 3147if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3157var ch = TextWindow.PeekChar(); 3247switch (ch = TextWindow.PeekChar()) 3344char ch = TextWindow.PeekChar(); 3421switch (ch = TextWindow.PeekChar()) 3486var ch = TextWindow.PeekChar(); 3578switch (TextWindow.PeekChar()) 3744if (TextWindow.PeekChar() == '.') 3875if (TextWindow.PeekChar() == '@') 3888else if (TextWindow.PeekChar() == '&') 3926char peekCh = TextWindow.PeekChar(); 4044switch (ch = TextWindow.PeekChar()) 4088var ch = TextWindow.PeekChar(); 4166switch (ch = TextWindow.PeekChar()) 4218var ch = TextWindow.PeekChar(); 4297switch (ch = TextWindow.PeekChar()) 4342var ch = TextWindow.PeekChar(); 4405if (TextWindow.PeekChar() == '/' 4426char ch = TextWindow.PeekChar(); 4451while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4466if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4514if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4530char ch = TextWindow.PeekChar(); 4552char ch = TextWindow.PeekChar(); 4597if (TextWindow.PeekChar() == '\\') 4618return TextWindow.PeekChar(); 4636var ch = TextWindow.PeekChar(); 4664char character = TextWindow.PeekChar(); 4668character = TextWindow.PeekChar(); 4674if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4685character = TextWindow.PeekChar(); 4719if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4730char ch2 = TextWindow.PeekChar(); 4769Debug.Assert(TextWindow.PeekChar() == '&'); 4776switch (TextWindow.PeekChar()) 4820while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4838while (SyntaxFacts.IsDecDigit(digit = TextWindow.PeekChar()))
Parser\Lexer_RawStringLiteral.cs (11)
20while (TextWindow.PeekChar() == ch) 45var ch = TextWindow.PeekChar(); 68if (SyntaxFacts.IsNewLine(TextWindow.PeekChar())) 132var currentChar = TextWindow.PeekChar(); 197Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 224Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 282var currentChar = TextWindow.PeekChar(); 317Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 324_builder.Append(TextWindow.PeekChar()); 341var isBlankLine = SyntaxFacts.IsNewLine(TextWindow.PeekChar()); 380var currentChar = TextWindow.PeekChar();
Parser\Lexer_StringLiteral.cs (23)
16var quoteCharacter = TextWindow.PeekChar(); 19if (TextWindow.PeekChar() == '"' && 40char ch = TextWindow.PeekChar(); 120if (TextWindow.PeekChar() is ('u' or 'U') && TextWindow.PeekChar(1) == '8') 194Debug.Assert(TextWindow.PeekChar() == '@'); 198while (TextWindow.PeekChar() == '@') 208Debug.Assert(TextWindow.PeekChar() == '"'); 213var ch = TextWindow.PeekChar(); 217if (TextWindow.PeekChar() == '"') 361char ch = _lexer.TextWindow.PeekChar(); 488if (SyntaxFacts.IsNewLine(window.PeekChar())) 531if (_lexer.TextWindow.PeekChar() != '"') 554if (_lexer.TextWindow.PeekChar() != '"') 598else if (_lexer.TextWindow.PeekChar() == '"') 658switch (_lexer.TextWindow.PeekChar()) 729if (SyntaxFacts.IsNewLine(_lexer.TextWindow.PeekChar())) 807if (_lexer.TextWindow.PeekChar() == '}') 861if (_lexer.TextWindow.PeekChar() == '}') 953Debug.Assert(_lexer.TextWindow.PeekChar() == ':'); 957char ch = _lexer.TextWindow.PeekChar(); 1008char ch = _lexer.TextWindow.PeekChar(); 1139Debug.Assert(start == _lexer.TextWindow.PeekChar()); 1142if (_lexer.TextWindow.PeekChar() == end)
Parser\SlidingTextWindow.cs (4)
271if (PeekChar() != c) 303Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 304return GetNewLineWidth(this.PeekChar(), this.PeekChar(1)); 322char c = PeekChar();