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(); 2561switch (character = TextWindow.PeekChar()) 2605if (TextWindow.PeekChar() == '=') 2619if (TextWindow.PeekChar() == '=') 2758char ch = TextWindow.PeekChar(); 2812Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2857switch (ch = TextWindow.PeekChar()) 2907Debug.Assert(TextWindow.PeekChar() == '<'); 2956Debug.Assert(TextWindow.PeekChar() == '&'); 2963if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2965while (IsXmlNameChar(ch = TextWindow.PeekChar())) 3003bool isHex = TextWindow.PeekChar() == 'x'; 3009while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3022while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3034if (TextWindow.PeekChar() != ';') 3079ch = TextWindow.PeekChar(); 3124if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3134var ch = TextWindow.PeekChar(); 3224switch (ch = TextWindow.PeekChar()) 3321char ch = TextWindow.PeekChar(); 3398switch (ch = TextWindow.PeekChar()) 3463var ch = TextWindow.PeekChar(); 3555switch (TextWindow.PeekChar()) 3721if (TextWindow.PeekChar() == '.') 3852if (TextWindow.PeekChar() == '@') 3865else if (TextWindow.PeekChar() == '&') 3903char peekCh = TextWindow.PeekChar(); 4021switch (ch = TextWindow.PeekChar()) 4065var ch = TextWindow.PeekChar(); 4143switch (ch = TextWindow.PeekChar()) 4195var ch = TextWindow.PeekChar(); 4274switch (ch = TextWindow.PeekChar()) 4319var ch = TextWindow.PeekChar(); 4382if (TextWindow.PeekChar() == '/' 4403char ch = TextWindow.PeekChar(); 4428while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4443if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4491if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4507char ch = TextWindow.PeekChar(); 4529char ch = TextWindow.PeekChar(); 4574if (TextWindow.PeekChar() == '\\') 4595return TextWindow.PeekChar(); 4613var ch = TextWindow.PeekChar(); 4641char character = TextWindow.PeekChar(); 4645character = TextWindow.PeekChar(); 4651if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4662character = TextWindow.PeekChar(); 4696if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4707char ch2 = TextWindow.PeekChar(); 4746Debug.Assert(TextWindow.PeekChar() == '&'); 4753switch (TextWindow.PeekChar()) 4797while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4815while (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();