128 references to PeekChar
Microsoft.CodeAnalysis.CSharp (128)
Parser\Lexer.cs (90)
452character = TextWindow.PeekChar(); 629Debug.Assert(TextWindow.PeekChar() == '@'); 721if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.PeekChar())) 753Debug.Assert(TextWindow.PeekChar() == '@'); 779Debug.Assert(TextWindow.PeekChar() == '$'); 807while (TextWindow.PeekChar() is >= '0' and <= '9') 818if (TextWindow.PeekChar() == '_') 833char ch = TextWindow.PeekChar(); 876ch = TextWindow.PeekChar(); 899if (TextWindow.PeekChar() is 'L' or 'l') 903if (TextWindow.PeekChar() is 'u' or 'U') 909else if (TextWindow.PeekChar() is 'u' or 'U') 913if (TextWindow.PeekChar() is 'L' or 'l') 924if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 934if ((ch = TextWindow.PeekChar()) == '.') 953if ((ch = TextWindow.PeekChar()) is 'E' or 'e') 958if ((ch = TextWindow.PeekChar()) is '-' or '+') 964if (!(((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') || ch == '_')) 977ch = TextWindow.PeekChar(); 1019if (TextWindow.PeekChar() is 'u' or 'U') 1029if (TextWindow.PeekChar() is 'L' or 'l') 1445while (TextWindow.PeekChar() == '@') 1458char ch = TextWindow.PeekChar(); 1680if (TextWindow.PeekChar() == '&') 1712TextWindow.PeekChar() is 'u' or 'U') 1898char ch = TextWindow.PeekChar(); 2121var startCh = this.TextWindow.PeekChar(); 2147var ch = this.TextWindow.PeekChar(); 2185while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2200var ch = this.TextWindow.PeekChar(); 2230Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*'); 2236if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2257while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2271switch (ch = TextWindow.PeekChar()) 2300char ch = TextWindow.PeekChar(); 2408if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2448char ch = TextWindow.PeekChar(); 2515var ch = this.TextWindow.PeekChar(); 2574switch (character = TextWindow.PeekChar()) 2623if (TextWindow.PeekChar() == '=') 2637if (TextWindow.PeekChar() == '=') 2776char ch = TextWindow.PeekChar(); 2830Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2875switch (ch = TextWindow.PeekChar()) 2925Debug.Assert(TextWindow.PeekChar() == '<'); 2974Debug.Assert(TextWindow.PeekChar() == '&'); 2981if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2983while (IsXmlNameChar(ch = TextWindow.PeekChar())) 3021bool isHex = TextWindow.PeekChar() == 'x'; 3027while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3040while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3052if (TextWindow.PeekChar() != ';') 3097ch = TextWindow.PeekChar(); 3142if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3152var ch = TextWindow.PeekChar(); 3242switch (ch = TextWindow.PeekChar()) 3339char ch = TextWindow.PeekChar(); 3416switch (ch = TextWindow.PeekChar()) 3481var ch = TextWindow.PeekChar(); 3573switch (TextWindow.PeekChar()) 3739if (TextWindow.PeekChar() == '.') 3870if (TextWindow.PeekChar() == '@') 3883else if (TextWindow.PeekChar() == '&') 3921char peekCh = TextWindow.PeekChar(); 4039switch (ch = TextWindow.PeekChar()) 4083var ch = TextWindow.PeekChar(); 4161switch (ch = TextWindow.PeekChar()) 4213var ch = TextWindow.PeekChar(); 4292switch (ch = TextWindow.PeekChar()) 4337var ch = TextWindow.PeekChar(); 4400if (TextWindow.PeekChar() == '/' 4421char ch = TextWindow.PeekChar(); 4446while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4461if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4509if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4525char ch = TextWindow.PeekChar(); 4547char ch = TextWindow.PeekChar(); 4592if (TextWindow.PeekChar() == '\\') 4613return TextWindow.PeekChar(); 4631var ch = TextWindow.PeekChar(); 4659char character = TextWindow.PeekChar(); 4663character = TextWindow.PeekChar(); 4669if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4680character = TextWindow.PeekChar(); 4714if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4725char ch2 = TextWindow.PeekChar(); 4764Debug.Assert(TextWindow.PeekChar() == '&'); 4771switch (TextWindow.PeekChar()) 4815while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4833while (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)
267if (PeekChar() != c) 299Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 300return GetNewLineWidth(this.PeekChar(), this.PeekChar(1)); 318char c = PeekChar();