129 references to PeekChar
Microsoft.CodeAnalysis.CSharp (129)
Parser\Lexer.cs (91)
448character = TextWindow.PeekChar(); 476var priorCharacterIsDot = this.TextWindow.PeekChar() is '.'; 630Debug.Assert(TextWindow.PeekChar() == '@'); 722if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.PeekChar())) 754Debug.Assert(TextWindow.PeekChar() == '@'); 780Debug.Assert(TextWindow.PeekChar() == '$'); 808while (TextWindow.PeekChar() is >= '0' and <= '9') 819if (TextWindow.PeekChar() == '_') 834char ch = TextWindow.PeekChar(); 877ch = TextWindow.PeekChar(); 900if (TextWindow.PeekChar() is 'L' or 'l') 904if (TextWindow.PeekChar() is 'u' or 'U') 910else if (TextWindow.PeekChar() is 'u' or 'U') 914if (TextWindow.PeekChar() is 'L' or 'l') 925if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.PeekChar() == '#') 935if ((ch = TextWindow.PeekChar()) == '.') 954if ((ch = TextWindow.PeekChar()) is 'E' or 'e') 959if ((ch = TextWindow.PeekChar()) is '-' or '+') 965if (!(((ch = TextWindow.PeekChar()) >= '0' && ch <= '9') || ch == '_')) 978ch = TextWindow.PeekChar(); 1020if (TextWindow.PeekChar() is 'u' or 'U') 1030if (TextWindow.PeekChar() is 'L' or 'l') 1446while (TextWindow.PeekChar() == '@') 1459char ch = TextWindow.PeekChar(); 1681if (TextWindow.PeekChar() == '&') 1713TextWindow.PeekChar() is 'u' or 'U') 1899char ch = TextWindow.PeekChar(); 2122var startCh = this.TextWindow.PeekChar(); 2148var ch = this.TextWindow.PeekChar(); 2186while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2201var ch = this.TextWindow.PeekChar(); 2231Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*'); 2237if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2258while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2272switch (ch = TextWindow.PeekChar()) 2301char ch = TextWindow.PeekChar(); 2409if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2449char ch = TextWindow.PeekChar(); 2516var ch = this.TextWindow.PeekChar(); 2557switch (character = TextWindow.PeekChar()) 2601if (TextWindow.PeekChar() == '=') 2615if (TextWindow.PeekChar() == '=') 2754char ch = TextWindow.PeekChar(); 2808Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2853switch (ch = TextWindow.PeekChar()) 2903Debug.Assert(TextWindow.PeekChar() == '<'); 2952Debug.Assert(TextWindow.PeekChar() == '&'); 2959if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2961while (IsXmlNameChar(ch = TextWindow.PeekChar())) 2999bool isHex = TextWindow.PeekChar() == 'x'; 3005while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3018while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3030if (TextWindow.PeekChar() != ';') 3075ch = TextWindow.PeekChar(); 3120if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3130var ch = TextWindow.PeekChar(); 3220switch (ch = TextWindow.PeekChar()) 3317char ch = TextWindow.PeekChar(); 3394switch (ch = TextWindow.PeekChar()) 3459var ch = TextWindow.PeekChar(); 3551switch (TextWindow.PeekChar()) 3717if (TextWindow.PeekChar() == '.') 3848if (TextWindow.PeekChar() == '@') 3861else if (TextWindow.PeekChar() == '&') 3899char peekCh = TextWindow.PeekChar(); 4017switch (ch = TextWindow.PeekChar()) 4061var ch = TextWindow.PeekChar(); 4139switch (ch = TextWindow.PeekChar()) 4191var ch = TextWindow.PeekChar(); 4270switch (ch = TextWindow.PeekChar()) 4315var ch = TextWindow.PeekChar(); 4378if (TextWindow.PeekChar() == '/' 4399char ch = TextWindow.PeekChar(); 4424while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4439if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4487if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4503char ch = TextWindow.PeekChar(); 4525char ch = TextWindow.PeekChar(); 4570if (TextWindow.PeekChar() == '\\') 4591return TextWindow.PeekChar(); 4609var ch = TextWindow.PeekChar(); 4637char character = TextWindow.PeekChar(); 4641character = TextWindow.PeekChar(); 4647if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4658character = TextWindow.PeekChar(); 4692if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4703char ch2 = TextWindow.PeekChar(); 4742Debug.Assert(TextWindow.PeekChar() == '&'); 4749switch (TextWindow.PeekChar()) 4793while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4811while (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();