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
();
2579
switch (character = TextWindow.
PeekChar
())
2628
if (TextWindow.
PeekChar
() == '=')
2642
if (TextWindow.
PeekChar
() == '=')
2781
char ch = TextWindow.
PeekChar
();
2835
Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.
PeekChar
() == SlidingTextWindow.InvalidCharacter);
2880
switch (ch = TextWindow.
PeekChar
())
2930
Debug.Assert(TextWindow.
PeekChar
() == '<');
2979
Debug.Assert(TextWindow.
PeekChar
() == '&');
2986
if (IsXmlNameStartChar(ch = TextWindow.
PeekChar
()))
2988
while (IsXmlNameChar(ch = TextWindow.
PeekChar
()))
3026
bool isHex = TextWindow.
PeekChar
() == 'x';
3032
while (SyntaxFacts.IsHexDigit(ch = TextWindow.
PeekChar
()))
3045
while (SyntaxFacts.IsDecDigit(ch = TextWindow.
PeekChar
()))
3057
if (TextWindow.
PeekChar
() != ';')
3102
ch = TextWindow.
PeekChar
();
3147
if (TextWindow.
PeekChar
() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>')
3157
var ch = TextWindow.
PeekChar
();
3247
switch (ch = TextWindow.
PeekChar
())
3344
char ch = TextWindow.
PeekChar
();
3421
switch (ch = TextWindow.
PeekChar
())
3486
var ch = TextWindow.
PeekChar
();
3578
switch (TextWindow.
PeekChar
())
3744
if (TextWindow.
PeekChar
() == '.')
3875
if (TextWindow.
PeekChar
() == '@')
3888
else if (TextWindow.
PeekChar
() == '&')
3926
char peekCh = TextWindow.
PeekChar
();
4044
switch (ch = TextWindow.
PeekChar
())
4088
var ch = TextWindow.
PeekChar
();
4166
switch (ch = TextWindow.
PeekChar
())
4218
var ch = TextWindow.
PeekChar
();
4297
switch (ch = TextWindow.
PeekChar
())
4342
var ch = TextWindow.
PeekChar
();
4405
if (TextWindow.
PeekChar
() == '/'
4426
char ch = TextWindow.
PeekChar
();
4451
while (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) != '/')
4466
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4514
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4530
char ch = TextWindow.
PeekChar
();
4552
char ch = TextWindow.
PeekChar
();
4597
if (TextWindow.
PeekChar
() == '\\')
4618
return TextWindow.
PeekChar
();
4636
var ch = TextWindow.
PeekChar
();
4664
char character = TextWindow.
PeekChar
();
4668
character = TextWindow.
PeekChar
();
4674
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4685
character = TextWindow.
PeekChar
();
4719
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4730
char ch2 = TextWindow.
PeekChar
();
4769
Debug.Assert(TextWindow.
PeekChar
() == '&');
4776
switch (TextWindow.
PeekChar
())
4820
while (SyntaxFacts.IsHexDigit(digit = TextWindow.
PeekChar
()))
4838
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
();