129 references to PeekChar
Microsoft.CodeAnalysis.CSharp (129)
Parser\Lexer.cs (91)
448
character = TextWindow.
PeekChar
();
476
var priorCharacterIsDot = this.TextWindow.
PeekChar
() is '.';
630
Debug.Assert(TextWindow.
PeekChar
() == '@');
722
if (char.IsHighSurrogate(character) && char.IsLowSurrogate(TextWindow.
PeekChar
()))
754
Debug.Assert(TextWindow.
PeekChar
() == '@');
780
Debug.Assert(TextWindow.
PeekChar
() == '$');
808
while (TextWindow.
PeekChar
() is >= '0' and <= '9')
819
if (TextWindow.
PeekChar
() == '_')
834
char ch = TextWindow.
PeekChar
();
877
ch = TextWindow.
PeekChar
();
900
if (TextWindow.
PeekChar
() is 'L' or 'l')
904
if (TextWindow.
PeekChar
() is 'u' or 'U')
910
else if (TextWindow.
PeekChar
() is 'u' or 'U')
914
if (TextWindow.
PeekChar
() is 'L' or 'l')
925
if (this.ModeIs(LexerMode.DebuggerSyntax) && TextWindow.
PeekChar
() == '#')
935
if ((ch = TextWindow.
PeekChar
()) == '.')
954
if ((ch = TextWindow.
PeekChar
()) is 'E' or 'e')
959
if ((ch = TextWindow.
PeekChar
()) is '-' or '+')
965
if (!(((ch = TextWindow.
PeekChar
()) >= '0' && ch <= '9') || ch == '_'))
978
ch = TextWindow.
PeekChar
();
1020
if (TextWindow.
PeekChar
() is 'u' or 'U')
1030
if (TextWindow.
PeekChar
() is 'L' or 'l')
1446
while (TextWindow.
PeekChar
() == '@')
1459
char ch = TextWindow.
PeekChar
();
1681
if (TextWindow.
PeekChar
() == '&')
1713
TextWindow.
PeekChar
() is 'u' or 'U')
1899
char ch = TextWindow.
PeekChar
();
2122
var startCh = this.TextWindow.
PeekChar
();
2148
var ch = this.TextWindow.
PeekChar
();
2186
while (SyntaxFacts.IsNewLine(this.TextWindow.
PeekChar
()))
2201
var ch = this.TextWindow.
PeekChar
();
2231
Debug.Assert(TextWindow.
PeekChar
() == delimiter && TextWindow.PeekChar(1) == '*');
2237
if ((ch = TextWindow.
PeekChar
()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd())
2258
while (!SyntaxFacts.IsNewLine(ch = TextWindow.
PeekChar
()) &&
2272
switch (ch = TextWindow.
PeekChar
())
2301
char ch = TextWindow.
PeekChar
();
2409
if (SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()))
2449
char ch = TextWindow.
PeekChar
();
2516
var ch = this.TextWindow.
PeekChar
();
2557
switch (character = TextWindow.
PeekChar
())
2601
if (TextWindow.
PeekChar
() == '=')
2615
if (TextWindow.
PeekChar
() == '=')
2754
char ch = TextWindow.
PeekChar
();
2808
Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.
PeekChar
() == SlidingTextWindow.InvalidCharacter);
2853
switch (ch = TextWindow.
PeekChar
())
2903
Debug.Assert(TextWindow.
PeekChar
() == '<');
2952
Debug.Assert(TextWindow.
PeekChar
() == '&');
2959
if (IsXmlNameStartChar(ch = TextWindow.
PeekChar
()))
2961
while (IsXmlNameChar(ch = TextWindow.
PeekChar
()))
2999
bool isHex = TextWindow.
PeekChar
() == 'x';
3005
while (SyntaxFacts.IsHexDigit(ch = TextWindow.
PeekChar
()))
3018
while (SyntaxFacts.IsDecDigit(ch = TextWindow.
PeekChar
()))
3030
if (TextWindow.
PeekChar
() != ';')
3075
ch = TextWindow.
PeekChar
();
3120
if (TextWindow.
PeekChar
() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>')
3130
var ch = TextWindow.
PeekChar
();
3220
switch (ch = TextWindow.
PeekChar
())
3317
char ch = TextWindow.
PeekChar
();
3394
switch (ch = TextWindow.
PeekChar
())
3459
var ch = TextWindow.
PeekChar
();
3551
switch (TextWindow.
PeekChar
())
3717
if (TextWindow.
PeekChar
() == '.')
3848
if (TextWindow.
PeekChar
() == '@')
3861
else if (TextWindow.
PeekChar
() == '&')
3899
char peekCh = TextWindow.
PeekChar
();
4017
switch (ch = TextWindow.
PeekChar
())
4061
var ch = TextWindow.
PeekChar
();
4139
switch (ch = TextWindow.
PeekChar
())
4191
var ch = TextWindow.
PeekChar
();
4270
switch (ch = TextWindow.
PeekChar
())
4315
var ch = TextWindow.
PeekChar
();
4378
if (TextWindow.
PeekChar
() == '/'
4399
char ch = TextWindow.
PeekChar
();
4424
while (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) != '/')
4439
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4487
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4503
char ch = TextWindow.
PeekChar
();
4525
char ch = TextWindow.
PeekChar
();
4570
if (TextWindow.
PeekChar
() == '\\')
4591
return TextWindow.
PeekChar
();
4609
var ch = TextWindow.
PeekChar
();
4637
char character = TextWindow.
PeekChar
();
4641
character = TextWindow.
PeekChar
();
4647
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4658
character = TextWindow.
PeekChar
();
4692
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4703
char ch2 = TextWindow.
PeekChar
();
4742
Debug.Assert(TextWindow.
PeekChar
() == '&');
4749
switch (TextWindow.
PeekChar
())
4793
while (SyntaxFacts.IsHexDigit(digit = TextWindow.
PeekChar
()))
4811
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
();