129 references to PeekChar
Microsoft.CodeAnalysis.CSharp (129)
Parser\Lexer.cs (91)
452
character = TextWindow.
PeekChar
();
480
var priorCharacterIsDot = this.TextWindow.
PeekChar
() is '.';
634
Debug.Assert(TextWindow.
PeekChar
() == '@');
726
if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.
PeekChar
()))
758
Debug.Assert(TextWindow.
PeekChar
() == '@');
784
Debug.Assert(TextWindow.
PeekChar
() == '$');
812
while (TextWindow.
PeekChar
() is >= '0' and <= '9')
823
if (TextWindow.
PeekChar
() == '_')
838
char ch = TextWindow.
PeekChar
();
881
ch = TextWindow.
PeekChar
();
904
if (TextWindow.
PeekChar
() is 'L' or 'l')
908
if (TextWindow.
PeekChar
() is 'u' or 'U')
914
else if (TextWindow.
PeekChar
() is 'u' or 'U')
918
if (TextWindow.
PeekChar
() is 'L' or 'l')
929
if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.
PeekChar
() == '#')
939
if ((ch = TextWindow.
PeekChar
()) == '.')
958
if ((ch = TextWindow.
PeekChar
()) is 'E' or 'e')
963
if ((ch = TextWindow.
PeekChar
()) is '-' or '+')
969
if (!(((ch = TextWindow.
PeekChar
()) >= '0' && ch <= '9') || ch == '_'))
982
ch = TextWindow.
PeekChar
();
1024
if (TextWindow.
PeekChar
() is 'u' or 'U')
1034
if (TextWindow.
PeekChar
() is 'L' or 'l')
1450
while (TextWindow.
PeekChar
() == '@')
1463
char ch = TextWindow.
PeekChar
();
1685
if (TextWindow.
PeekChar
() == '&')
1717
TextWindow.
PeekChar
() is 'u' or 'U')
1903
char ch = TextWindow.
PeekChar
();
2126
var startCh = this.TextWindow.
PeekChar
();
2152
var ch = this.TextWindow.
PeekChar
();
2190
while (SyntaxFacts.IsNewLine(this.TextWindow.
PeekChar
()))
2205
var ch = this.TextWindow.
PeekChar
();
2235
Debug.Assert(TextWindow.
PeekChar
() == delimiter && TextWindow.PeekChar(1) == '*');
2241
if ((ch = TextWindow.
PeekChar
()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd())
2262
while (!SyntaxFacts.IsNewLine(ch = TextWindow.
PeekChar
()) &&
2276
switch (ch = TextWindow.
PeekChar
())
2305
char ch = TextWindow.
PeekChar
();
2413
if (SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()))
2453
char ch = TextWindow.
PeekChar
();
2520
var ch = this.TextWindow.
PeekChar
();
2561
switch (character = TextWindow.
PeekChar
())
2605
if (TextWindow.
PeekChar
() == '=')
2619
if (TextWindow.
PeekChar
() == '=')
2758
char ch = TextWindow.
PeekChar
();
2812
Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.
PeekChar
() == SlidingTextWindow.InvalidCharacter);
2857
switch (ch = TextWindow.
PeekChar
())
2907
Debug.Assert(TextWindow.
PeekChar
() == '<');
2956
Debug.Assert(TextWindow.
PeekChar
() == '&');
2963
if (IsXmlNameStartChar(ch = TextWindow.
PeekChar
()))
2965
while (IsXmlNameChar(ch = TextWindow.
PeekChar
()))
3003
bool isHex = TextWindow.
PeekChar
() == 'x';
3009
while (SyntaxFacts.IsHexDigit(ch = TextWindow.
PeekChar
()))
3022
while (SyntaxFacts.IsDecDigit(ch = TextWindow.
PeekChar
()))
3034
if (TextWindow.
PeekChar
() != ';')
3079
ch = TextWindow.
PeekChar
();
3124
if (TextWindow.
PeekChar
() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>')
3134
var ch = TextWindow.
PeekChar
();
3224
switch (ch = TextWindow.
PeekChar
())
3321
char ch = TextWindow.
PeekChar
();
3398
switch (ch = TextWindow.
PeekChar
())
3463
var ch = TextWindow.
PeekChar
();
3555
switch (TextWindow.
PeekChar
())
3721
if (TextWindow.
PeekChar
() == '.')
3852
if (TextWindow.
PeekChar
() == '@')
3865
else if (TextWindow.
PeekChar
() == '&')
3903
char peekCh = TextWindow.
PeekChar
();
4021
switch (ch = TextWindow.
PeekChar
())
4065
var ch = TextWindow.
PeekChar
();
4143
switch (ch = TextWindow.
PeekChar
())
4195
var ch = TextWindow.
PeekChar
();
4274
switch (ch = TextWindow.
PeekChar
())
4319
var ch = TextWindow.
PeekChar
();
4382
if (TextWindow.
PeekChar
() == '/'
4403
char ch = TextWindow.
PeekChar
();
4428
while (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) != '/')
4443
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4491
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4507
char ch = TextWindow.
PeekChar
();
4529
char ch = TextWindow.
PeekChar
();
4574
if (TextWindow.
PeekChar
() == '\\')
4595
return TextWindow.
PeekChar
();
4613
var ch = TextWindow.
PeekChar
();
4641
char character = TextWindow.
PeekChar
();
4645
character = TextWindow.
PeekChar
();
4651
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4662
character = TextWindow.
PeekChar
();
4696
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4707
char ch2 = TextWindow.
PeekChar
();
4746
Debug.Assert(TextWindow.
PeekChar
() == '&');
4753
switch (TextWindow.
PeekChar
())
4797
while (SyntaxFacts.IsHexDigit(digit = TextWindow.
PeekChar
()))
4815
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)
271
if (
PeekChar
() != c)
303
Debug.Assert(SyntaxFacts.IsNewLine(this.
PeekChar
()));
304
return GetNewLineWidth(this.
PeekChar
(), this.PeekChar(1));
322
char c =
PeekChar
();