130 references to PeekChar
Microsoft.CodeAnalysis.CSharp (130)
Parser\Lexer.cs (91)
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')
1441
while (TextWindow.
PeekChar
() == '@')
1454
char ch = TextWindow.
PeekChar
();
1676
if (TextWindow.
PeekChar
() == '&')
1708
TextWindow.
PeekChar
() is 'u' or 'U')
1894
char ch = TextWindow.
PeekChar
();
2117
var startCh = this.TextWindow.
PeekChar
();
2143
var ch = this.TextWindow.
PeekChar
();
2181
while (SyntaxFacts.IsNewLine(this.TextWindow.
PeekChar
()))
2196
var ch = this.TextWindow.
PeekChar
();
2226
Debug.Assert(TextWindow.
PeekChar
() == delimiter && TextWindow.PeekChar(1) == '*');
2232
if ((ch = TextWindow.
PeekChar
()) == SlidingTextWindow.InvalidCharacter && TextWindow.IsReallyAtEnd())
2253
while (!SyntaxFacts.IsNewLine(ch = TextWindow.
PeekChar
()) &&
2267
switch (ch = TextWindow.
PeekChar
())
2292
Debug.Assert(SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()));
2298
char ch = TextWindow.
PeekChar
();
2400
if (SyntaxFacts.IsWhitespace(TextWindow.
PeekChar
()))
2440
char ch = TextWindow.
PeekChar
();
2507
var ch = this.TextWindow.
PeekChar
();
2566
switch (character = TextWindow.
PeekChar
())
2615
if (TextWindow.
PeekChar
() == '=')
2629
if (TextWindow.
PeekChar
() == '=')
2768
char ch = TextWindow.
PeekChar
();
2822
Debug.Assert(this.LocationIs(XmlDocCommentLocation.End) || TextWindow.
PeekChar
() == SlidingTextWindow.InvalidCharacter);
2867
switch (ch = TextWindow.
PeekChar
())
2917
Debug.Assert(TextWindow.
PeekChar
() == '<');
2966
Debug.Assert(TextWindow.
PeekChar
() == '&');
2973
if (IsXmlNameStartChar(ch = TextWindow.
PeekChar
()))
2975
while (IsXmlNameChar(ch = TextWindow.
PeekChar
()))
3013
bool isHex = TextWindow.
PeekChar
() == 'x';
3019
while (SyntaxFacts.IsHexDigit(ch = TextWindow.
PeekChar
()))
3032
while (SyntaxFacts.IsDecDigit(ch = TextWindow.
PeekChar
()))
3044
if (TextWindow.
PeekChar
() != ';')
3089
ch = TextWindow.
PeekChar
();
3134
if (TextWindow.
PeekChar
() == ']' && TextWindow.PeekChar(1) == ']' && TextWindow.PeekChar(2) == '>')
3144
var ch = TextWindow.
PeekChar
();
3234
switch (ch = TextWindow.
PeekChar
())
3331
char ch = TextWindow.
PeekChar
();
3408
switch (ch = TextWindow.
PeekChar
())
3473
var ch = TextWindow.
PeekChar
();
3565
switch (TextWindow.
PeekChar
())
3731
if (TextWindow.
PeekChar
() == '.')
3862
if (TextWindow.
PeekChar
() == '@')
3875
else if (TextWindow.
PeekChar
() == '&')
3913
char peekCh = TextWindow.
PeekChar
();
4031
switch (ch = TextWindow.
PeekChar
())
4075
var ch = TextWindow.
PeekChar
();
4153
switch (ch = TextWindow.
PeekChar
())
4205
var ch = TextWindow.
PeekChar
();
4284
switch (ch = TextWindow.
PeekChar
())
4329
var ch = TextWindow.
PeekChar
();
4392
if (TextWindow.
PeekChar
() == '/'
4413
char ch = TextWindow.
PeekChar
();
4438
while (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) != '/')
4453
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4501
if (TextWindow.
PeekChar
() == '*' && TextWindow.PeekChar(1) == '/')
4517
char ch = TextWindow.
PeekChar
();
4539
char ch = TextWindow.
PeekChar
();
4584
if (TextWindow.
PeekChar
() == '\\')
4605
return TextWindow.
PeekChar
();
4623
var ch = TextWindow.
PeekChar
();
4651
char character = TextWindow.
PeekChar
();
4655
character = TextWindow.
PeekChar
();
4661
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4672
character = TextWindow.
PeekChar
();
4706
if (!SyntaxFacts.IsHexDigit(TextWindow.
PeekChar
()))
4717
char ch2 = TextWindow.
PeekChar
();
4756
Debug.Assert(TextWindow.
PeekChar
() == '&');
4763
switch (TextWindow.
PeekChar
())
4807
while (SyntaxFacts.IsHexDigit(digit = TextWindow.
PeekChar
()))
4825
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
();