130 references to PeekChar
Microsoft.CodeAnalysis.CSharp (130)
Parser\Lexer.cs (91)
437character = TextWindow.PeekChar(); 614Debug.Assert(TextWindow.PeekChar() == '@'); 706if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.PeekChar())) 738Debug.Assert(TextWindow.PeekChar() == '@'); 764Debug.Assert(TextWindow.PeekChar() == '$'); 792while (TextWindow.PeekChar() is >= '0' and <= '9') 803if (TextWindow.PeekChar() == '_') 818char ch = TextWindow.PeekChar(); 861ch = TextWindow.PeekChar(); 884if (TextWindow.PeekChar() is 'L' or 'l') 888if (TextWindow.PeekChar() is 'u' or 'U') 894else if (TextWindow.PeekChar() is 'u' or 'U') 898if (TextWindow.PeekChar() is 'L' or 'l') 909if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 919if ((ch = TextWindow.PeekChar()) == '.') 938if ((ch = TextWindow.PeekChar()) is 'E' or 'e') 943if ((ch = TextWindow.PeekChar()) is '-' or '+') 949if (!(((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') || ch == '_')) 962ch = TextWindow.PeekChar(); 1004if (TextWindow.PeekChar() is 'u' or 'U') 1014if (TextWindow.PeekChar() is 'L' or 'l') 1426while (TextWindow.PeekChar() == '@') 1439char ch = TextWindow.PeekChar(); 1661if (TextWindow.PeekChar() == '&') 1693TextWindow.PeekChar() is 'u' or 'U') 1879char ch = TextWindow.PeekChar(); 2102var startCh = this.TextWindow.PeekChar(); 2128var ch = this.TextWindow.PeekChar(); 2166while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2181var ch = this.TextWindow.PeekChar(); 2211Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*'); 2217if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2238while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2252switch (ch = TextWindow.PeekChar()) 2277Debug.Assert(SyntaxFacts.IsWhitespace(TextWindow.PeekChar())); 2283char ch = TextWindow.PeekChar(); 2385if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2425char ch = TextWindow.PeekChar(); 2492var ch = this.TextWindow.PeekChar(); 2551switch (character = TextWindow.PeekChar()) 2600if (TextWindow.PeekChar() == '=') 2614if (TextWindow.PeekChar() == '=') 2753char ch = TextWindow.PeekChar(); 2807Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2852switch (ch = TextWindow.PeekChar()) 2902Debug.Assert(TextWindow.PeekChar() == '<'); 2951Debug.Assert(TextWindow.PeekChar() == '&'); 2958if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2960while (IsXmlNameChar(ch = TextWindow.PeekChar())) 2998bool isHex = TextWindow.PeekChar() == 'x'; 3004while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3017while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3029if (TextWindow.PeekChar() != ';') 3074ch = TextWindow.PeekChar(); 3119if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3129var ch = TextWindow.PeekChar(); 3219switch (ch = TextWindow.PeekChar()) 3316char ch = TextWindow.PeekChar(); 3393switch (ch = TextWindow.PeekChar()) 3458var ch = TextWindow.PeekChar(); 3550switch (TextWindow.PeekChar()) 3716if (TextWindow.PeekChar() == '.') 3847if (TextWindow.PeekChar() == '@') 3860else if (TextWindow.PeekChar() == '&') 3898char peekCh = TextWindow.PeekChar(); 4016switch (ch = TextWindow.PeekChar()) 4060var ch = TextWindow.PeekChar(); 4138switch (ch = TextWindow.PeekChar()) 4190var ch = TextWindow.PeekChar(); 4269switch (ch = TextWindow.PeekChar()) 4314var ch = TextWindow.PeekChar(); 4377if (TextWindow.PeekChar() == '/' 4398char ch = TextWindow.PeekChar(); 4423while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4438if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4486if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4502char ch = TextWindow.PeekChar(); 4524char ch = TextWindow.PeekChar(); 4569if (TextWindow.PeekChar() == '\\') 4590return TextWindow.PeekChar(); 4608var ch = TextWindow.PeekChar(); 4636char character = TextWindow.PeekChar(); 4640character = TextWindow.PeekChar(); 4646if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4657character = TextWindow.PeekChar(); 4691if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4702char ch2 = TextWindow.PeekChar(); 4741Debug.Assert(TextWindow.PeekChar() == '&'); 4748switch (TextWindow.PeekChar()) 4792while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4810while (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 (5)
257if (PeekChar() != c) 290Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 291return GetNewLineWidth(this.PeekChar(), this.PeekChar(1)); 309char c = PeekChar(); 350var ch = PeekChar();