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