150 references to PeekChar
Microsoft.CodeAnalysis.CSharp (150)
Parser\Lexer.cs (100)
443character = TextWindow.PeekChar(); 453if (TextWindow.PeekChar() == '=') 469if (TextWindow.PeekChar() == '.') 472if (TextWindow.PeekChar() == '.') 497if (TextWindow.PeekChar() == ':') 521if (TextWindow.PeekChar() == '=') 535if ((character = TextWindow.PeekChar()) == '=') 554if (TextWindow.PeekChar() == '=') 598if (TextWindow.PeekChar() == '?') 602if (TextWindow.PeekChar() == '=') 621if ((character = TextWindow.PeekChar()) == '=') 640if ((character = TextWindow.PeekChar()) == '=') 664if (TextWindow.PeekChar() == '=') 678if ((character = TextWindow.PeekChar()) == '=') 683else if (TextWindow.PeekChar() == '&') 697if (TextWindow.PeekChar() == '=') 711if (TextWindow.PeekChar() == '=') 716else if (TextWindow.PeekChar() == '|') 730if (TextWindow.PeekChar() == '=') 735else if (TextWindow.PeekChar() == '<') 738if (TextWindow.PeekChar() == '=') 757if (TextWindow.PeekChar() == '=') 773Debug.Assert(TextWindow.PeekChar() == '@'); 935Debug.Assert(TextWindow.PeekChar() == '@'); 961Debug.Assert(TextWindow.PeekChar() == '$'); 1002while ((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') 1013if (TextWindow.PeekChar() == '_') 1028char ch = TextWindow.PeekChar(); 1071ch = TextWindow.PeekChar(); 1094if ((ch = TextWindow.PeekChar()) == 'L' || ch == 'l') 1098if ((ch = TextWindow.PeekChar()) == 'u' || ch == 'U') 1104else if ((ch = TextWindow.PeekChar()) == 'u' || ch == 'U') 1108if ((ch = TextWindow.PeekChar()) == 'L' || ch == 'l') 1119if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 1129if ((ch = TextWindow.PeekChar()) == '.') 1148if ((ch = TextWindow.PeekChar()) == 'E' || ch == 'e') 1153if ((ch = TextWindow.PeekChar()) == '-' || ch == '+') 1159if (!(((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') || ch == '_')) 1174if ((ch = TextWindow.PeekChar()) == 'f' || ch == 'F') 1194else if ((ch = TextWindow.PeekChar()) == 'f' || ch == 'F') 1213if ((ch = TextWindow.PeekChar()) == 'u' || ch == 'U') 1223if ((ch = TextWindow.PeekChar()) == 'L' || ch == 'l') 1699while (TextWindow.PeekChar() == '@') 1712char ch = TextWindow.PeekChar(); 2003if (TextWindow.PeekChar() == '&') 2035(TextWindow.PeekChar() == 'u' || TextWindow.PeekChar() == 'U')) 2281char ch = TextWindow.PeekChar(); 2455var startCh = this.TextWindow.PeekChar(); 2481var ch = this.TextWindow.PeekChar(); 2519while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2534var ch = this.TextWindow.PeekChar(); 2563if (TextWindow.PeekChar() == '/' && TextWindow.PeekChar(1) == '*') 2570if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2599while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2613switch (ch = TextWindow.PeekChar()) 2617if (TextWindow.PeekChar() == '\n') 2653char ch = TextWindow.PeekChar(); 2764if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2795char ch = TextWindow.PeekChar(); 2853var ch = this.TextWindow.PeekChar(); 2887switch (character = TextWindow.PeekChar()) 2931if (TextWindow.PeekChar() == '=') 2945if (TextWindow.PeekChar() == '=') 3088char ch = TextWindow.PeekChar(); 3150Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 3195switch (ch = TextWindow.PeekChar()) 3245Debug.Assert(TextWindow.PeekChar() == '<'); 3294Debug.Assert(TextWindow.PeekChar() == '&'); 3301if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 3303while (IsXmlNameChar(ch = TextWindow.PeekChar())) 3341bool isHex = TextWindow.PeekChar() == 'x'; 3347while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3360while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3372if (TextWindow.PeekChar() != ';') 3417ch = TextWindow.PeekChar(); 3462if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3472var ch = TextWindow.PeekChar(); 3562switch (ch = TextWindow.PeekChar()) 3659char ch = TextWindow.PeekChar(); 3736switch (ch = TextWindow.PeekChar()) 3801var ch = TextWindow.PeekChar(); 3893switch (TextWindow.PeekChar()) 4059if (TextWindow.PeekChar() == '.') 4190if (TextWindow.PeekChar() == '@') 4203else if (TextWindow.PeekChar() == '&') 4241char peekCh = TextWindow.PeekChar(); 4359switch (ch = TextWindow.PeekChar()) 4403var ch = TextWindow.PeekChar(); 4481switch (ch = TextWindow.PeekChar()) 4533var ch = TextWindow.PeekChar(); 4612switch (ch = TextWindow.PeekChar()) 4657var ch = TextWindow.PeekChar(); 4720if (TextWindow.PeekChar() == '/' 4741char ch = TextWindow.PeekChar(); 4766while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4781if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4829if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4845char ch = TextWindow.PeekChar(); 4867char ch = 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') 187Debug.Assert(TextWindow.PeekChar() == '@'); 191while (TextWindow.PeekChar() == '@') 201Debug.Assert(TextWindow.PeekChar() == '"'); 206var ch = TextWindow.PeekChar(); 210if (TextWindow.PeekChar() == '"') 354char ch = _lexer.TextWindow.PeekChar(); 481if (SyntaxFacts.IsNewLine(window.PeekChar())) 524if (_lexer.TextWindow.PeekChar() != '"') 547if (_lexer.TextWindow.PeekChar() != '"') 591else if (_lexer.TextWindow.PeekChar() == '"') 651switch (_lexer.TextWindow.PeekChar()) 722if (SyntaxFacts.IsNewLine(_lexer.TextWindow.PeekChar())) 800if (_lexer.TextWindow.PeekChar() == '}') 854if (_lexer.TextWindow.PeekChar() == '}') 946Debug.Assert(_lexer.TextWindow.PeekChar() == ':'); 950char ch = _lexer.TextWindow.PeekChar(); 1001char ch = _lexer.TextWindow.PeekChar(); 1124Debug.Assert(start == _lexer.TextWindow.PeekChar()); 1127if (_lexer.TextWindow.PeekChar() == end)
Parser\SlidingTextWindow.cs (16)
290Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 291return GetNewLineWidth(this.PeekChar(), this.PeekChar(1)); 309char c = PeekChar(); 366if (this.PeekChar() == '\\') 387return this.PeekChar(); 405var ch = this.PeekChar(); 433char character = this.PeekChar(); 437character = this.PeekChar(); 443if (!SyntaxFacts.IsHexDigit(this.PeekChar())) 454character = this.PeekChar(); 488if (!SyntaxFacts.IsHexDigit(this.PeekChar())) 499char ch2 = this.PeekChar(); 538Debug.Assert(this.PeekChar() == '&'); 545switch (this.PeekChar()) 589while (SyntaxFacts.IsHexDigit(digit = this.PeekChar())) 607while (SyntaxFacts.IsDecDigit(digit = this.PeekChar()))