130 references to PeekChar
Microsoft.CodeAnalysis.CSharp (130)
Parser\Lexer.cs (91)
437
character = TextWindow.
PeekChar
();
614
Debug.Assert(TextWindow.
PeekChar
() == '@');
706
if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.
PeekChar
()))
738
Debug.Assert(TextWindow.
PeekChar
() == '@');
764
Debug.Assert(TextWindow.
PeekChar
() == '$');
792
while (TextWindow.
PeekChar
() is >= '0' and <= '9')
803
if (TextWindow.
PeekChar
() == '_')
818
char ch = TextWindow.
PeekChar
();
861
ch = TextWindow.
PeekChar
();
884
if (TextWindow.
PeekChar
() is 'L' or 'l')
888
if (TextWindow.
PeekChar
() is 'u' or 'U')
894
else if (TextWindow.
PeekChar
() is 'u' or 'U')
898
if (TextWindow.
PeekChar
() is 'L' or 'l')
909
if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.
PeekChar
() == '#')
919
if ((ch = TextWindow.
PeekChar
()) == '.')
938
if ((ch = TextWindow.
PeekChar
()) is 'E' or 'e')
943
if ((ch = TextWindow.
PeekChar
()) is '-' or '+')
949
if (!(((ch = TextWindow.
PeekChar
()) >= '0' && ch <= '9') || ch == '_'))
962
ch = TextWindow.
PeekChar
();
1004
if (TextWindow.
PeekChar
() is 'u' or 'U')
1014
if (TextWindow.
PeekChar
() is 'L' or 'l')
1426
while (TextWindow.
PeekChar
() == '@')
1439
char ch = TextWindow.
PeekChar
();
1661
if (TextWindow.
PeekChar
() == '&')
1693
TextWindow.
PeekChar
() is 'u' or 'U')
1879
char ch = TextWindow.
PeekChar
();
2102
var startCh = this.TextWindow.
PeekChar
();
2128
var ch = this.TextWindow.
PeekChar
();
2166
while (SyntaxFacts.IsNewLine(this.TextWindow.
PeekChar
()))
2181
var ch = this.TextWindow.
PeekChar
();
2211
Debug.Assert(TextWindow.
PeekChar
() == delimiter && TextWindow.PeekChar(1) == '*');
2217
if ((ch = TextWindow.
PeekChar
()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd())
2238
while (!SyntaxFacts.IsNewLine(ch = TextWindow.
PeekChar
()) &&
2252
switch (ch = TextWindow.
PeekChar
())
2277
Debug.Assert(SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()));
2283
char ch = TextWindow.
PeekChar
();
2385
if (SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()))
2425
char ch = TextWindow.
PeekChar
();
2492
var ch = this.TextWindow.
PeekChar
();
2551
switch (character = TextWindow.
PeekChar
())
2600
if (TextWindow.
PeekChar
() == '=')
2614
if (TextWindow.
PeekChar
() == '=')
2753
char ch = TextWindow.
PeekChar
();
2807
Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.
PeekChar
() == SlidingTextWindow.InvalidCharacter);
2852
switch (ch = TextWindow.
PeekChar
())
2902
Debug.Assert(TextWindow.
PeekChar
() == '<');
2951
Debug.Assert(TextWindow.
PeekChar
() == '&');
2958
if (IsXmlNameStartChar(ch = TextWindow.
PeekChar
()))
2960
while (IsXmlNameChar(ch = TextWindow.
PeekChar
()))
2998
bool isHex = TextWindow.
PeekChar
() == 'x';
3004
while (SyntaxFacts.IsHexDigit(ch = TextWindow.
PeekChar
()))
3017
while (SyntaxFacts.IsDecDigit(ch = TextWindow.
PeekChar
()))
3029
if (TextWindow.
PeekChar
() != ';')
3074
ch = TextWindow.
PeekChar
();
3119
if (TextWindow.
PeekChar
() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>')
3129
var ch = TextWindow.
PeekChar
();
3219
switch (ch = TextWindow.
PeekChar
())
3316
char ch = TextWindow.
PeekChar
();
3393
switch (ch = TextWindow.
PeekChar
())
3458
var ch = TextWindow.
PeekChar
();
3550
switch (TextWindow.
PeekChar
())
3716
if (TextWindow.
PeekChar
() == '.')
3847
if (TextWindow.
PeekChar
() == '@')
3860
else if (TextWindow.
PeekChar
() == '&')
3898
char peekCh = TextWindow.
PeekChar
();
4016
switch (ch = TextWindow.
PeekChar
())
4060
var ch = TextWindow.
PeekChar
();
4138
switch (ch = TextWindow.
PeekChar
())
4190
var ch = TextWindow.
PeekChar
();
4269
switch (ch = TextWindow.
PeekChar
())
4314
var ch = TextWindow.
PeekChar
();
4377
if (TextWindow.
PeekChar
() == '/'
4398
char ch = TextWindow.
PeekChar
();
4423
while (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) != '/')
4438
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4486
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4502
char ch = TextWindow.
PeekChar
();
4524
char ch = TextWindow.
PeekChar
();
4569
if (TextWindow.
PeekChar
() == '\\')
4590
return TextWindow.
PeekChar
();
4608
var ch = TextWindow.
PeekChar
();
4636
char character = TextWindow.
PeekChar
();
4640
character = TextWindow.
PeekChar
();
4646
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4657
character = TextWindow.
PeekChar
();
4691
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4702
char ch2 = TextWindow.
PeekChar
();
4741
Debug.Assert(TextWindow.
PeekChar
() == '&');
4748
switch (TextWindow.
PeekChar
())
4792
while (SyntaxFacts.IsHexDigit(digit = TextWindow.
PeekChar
()))
4810
while (SyntaxFacts.IsDecDigit(digit = TextWindow.
PeekChar
()))
Parser\Lexer_RawStringLiteral.cs (11)
20
while (TextWindow.
PeekChar
() == ch)
45
var ch = TextWindow.
PeekChar
();
68
if (SyntaxFacts.IsNewLine(TextWindow.
PeekChar
()))
132
var currentChar = TextWindow.
PeekChar
();
197
Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.
PeekChar
()));
224
Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.
PeekChar
()));
282
var currentChar = TextWindow.
PeekChar
();
317
Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.
PeekChar
()));
324
_builder.Append(TextWindow.
PeekChar
());
341
var isBlankLine = SyntaxFacts.IsNewLine(TextWindow.
PeekChar
());
380
var currentChar = TextWindow.
PeekChar
();
Parser\Lexer_StringLiteral.cs (23)
16
var quoteCharacter = TextWindow.
PeekChar
();
19
if (TextWindow.
PeekChar
() == '"' &&
40
char ch = TextWindow.
PeekChar
();
120
if (TextWindow.
PeekChar
() is ('u' or 'U') && TextWindow.PeekChar(1) == '8')
194
Debug.Assert(TextWindow.
PeekChar
() == '@');
198
while (TextWindow.
PeekChar
() == '@')
208
Debug.Assert(TextWindow.
PeekChar
() == '"');
213
var ch = TextWindow.
PeekChar
();
217
if (TextWindow.
PeekChar
() == '"')
361
char ch = _lexer.TextWindow.
PeekChar
();
488
if (SyntaxFacts.IsNewLine(window.
PeekChar
()))
531
if (_lexer.TextWindow.
PeekChar
() != '"')
554
if (_lexer.TextWindow.
PeekChar
() != '"')
598
else if (_lexer.TextWindow.
PeekChar
() == '"')
658
switch (_lexer.TextWindow.
PeekChar
())
729
if (SyntaxFacts.IsNewLine(_lexer.TextWindow.
PeekChar
()))
807
if (_lexer.TextWindow.
PeekChar
() == '}')
861
if (_lexer.TextWindow.
PeekChar
() == '}')
953
Debug.Assert(_lexer.TextWindow.
PeekChar
() == ':');
957
char ch = _lexer.TextWindow.
PeekChar
();
1008
char ch = _lexer.TextWindow.
PeekChar
();
1139
Debug.Assert(start == _lexer.TextWindow.
PeekChar
());
1142
if (_lexer.TextWindow.
PeekChar
() == end)
Parser\SlidingTextWindow.cs (5)
257
if (
PeekChar
() != c)
290
Debug.Assert(SyntaxFacts.IsNewLine(this.
PeekChar
()));
291
return GetNewLineWidth(this.
PeekChar
(), this.PeekChar(1));
309
char c =
PeekChar
();
350
var ch =
PeekChar
();