130 references to PeekChar
Microsoft.CodeAnalysis.CSharp (130)
Parser\Lexer.cs (91)
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') 1441while (TextWindow.PeekChar() == '@') 1454char ch = TextWindow.PeekChar(); 1676if (TextWindow.PeekChar() == '&') 1708TextWindow.PeekChar() is 'u' or 'U') 1894char ch = TextWindow.PeekChar(); 2117var startCh = this.TextWindow.PeekChar(); 2143var ch = this.TextWindow.PeekChar(); 2181while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2196var ch = this.TextWindow.PeekChar(); 2226Debug.Assert(TextWindow.PeekChar() == delimiter && TextWindow.PeekChar(1) == '*'); 2232if ((ch = TextWindow.PeekChar()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd()) 2253while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2267switch (ch = TextWindow.PeekChar()) 2292Debug.Assert(SyntaxFacts.IsWhitespace(TextWindow.PeekChar())); 2298char ch = TextWindow.PeekChar(); 2400if (SyntaxFacts.IsWhitespace(TextWindow.PeekChar())) 2440char ch = TextWindow.PeekChar(); 2507var ch = this.TextWindow.PeekChar(); 2566switch (character = TextWindow.PeekChar()) 2615if (TextWindow.PeekChar() == '=') 2629if (TextWindow.PeekChar() == '=') 2768char ch = TextWindow.PeekChar(); 2822Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.PeekChar() == SlidingTextWindow.InvalidCharacter); 2867switch (ch = TextWindow.PeekChar()) 2917Debug.Assert(TextWindow.PeekChar() == '<'); 2966Debug.Assert(TextWindow.PeekChar() == '&'); 2973if (IsXmlNameStartChar(ch = TextWindow.PeekChar())) 2975while (IsXmlNameChar(ch = TextWindow.PeekChar())) 3013bool isHex = TextWindow.PeekChar() == 'x'; 3019while (SyntaxFacts.IsHexDigit(ch = TextWindow.PeekChar())) 3032while (SyntaxFacts.IsDecDigit(ch = TextWindow.PeekChar())) 3044if (TextWindow.PeekChar() != ';') 3089ch = TextWindow.PeekChar(); 3134if (TextWindow.PeekChar() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>') 3144var ch = TextWindow.PeekChar(); 3234switch (ch = TextWindow.PeekChar()) 3331char ch = TextWindow.PeekChar(); 3408switch (ch = TextWindow.PeekChar()) 3473var ch = TextWindow.PeekChar(); 3565switch (TextWindow.PeekChar()) 3731if (TextWindow.PeekChar() == '.') 3862if (TextWindow.PeekChar() == '@') 3875else if (TextWindow.PeekChar() == '&') 3913char peekCh = TextWindow.PeekChar(); 4031switch (ch = TextWindow.PeekChar()) 4075var ch = TextWindow.PeekChar(); 4153switch (ch = TextWindow.PeekChar()) 4205var ch = TextWindow.PeekChar(); 4284switch (ch = TextWindow.PeekChar()) 4329var ch = TextWindow.PeekChar(); 4392if (TextWindow.PeekChar() == '/' 4413char ch = TextWindow.PeekChar(); 4438while (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) != '/') 4453if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4501if (TextWindow.PeekChar() == '*' && TextWindow.PeekChar(1) == '/') 4517char ch = TextWindow.PeekChar(); 4539char ch = TextWindow.PeekChar(); 4584if (TextWindow.PeekChar() == '\\') 4605return TextWindow.PeekChar(); 4623var ch = TextWindow.PeekChar(); 4651char character = TextWindow.PeekChar(); 4655character = TextWindow.PeekChar(); 4661if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4672character = TextWindow.PeekChar(); 4706if (!SyntaxFacts.IsHexDigit(TextWindow.PeekChar())) 4717char ch2 = TextWindow.PeekChar(); 4756Debug.Assert(TextWindow.PeekChar() == '&'); 4763switch (TextWindow.PeekChar()) 4807while (SyntaxFacts.IsHexDigit(digit = TextWindow.PeekChar())) 4825while (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();