156 references to Peek
Microsoft.CodeAnalysis.VisualBasic (156)
Scanner\Scanner.vb (106)
242Dim length = If(IsHighSurrogate(c) AndAlso CanGet(1) AndAlso IsLowSurrogate(Peek(1)), 2, 1) 417If chars(i) <> Peek(offset + i) Then Return False 423Return CanGet(offset) AndAlso (Peek(offset) = c) 498Debug.Assert(StartCharacter = Peek(here)) 542ch = Peek(num) 604Not IsNewLine(Peek(here)) Then 821IsSingleQuote(Peek(here)) AndAlso 822IsSingleQuote(Peek(here + 1)) AndAlso 823IsSingleQuote(Peek(here + 2)) AndAlso 824Not IsSingleQuote(Peek(here + 3)) 830Dim ch = Peek(here) 837Return _lineBufferOffset = 0 OrElse IsNewLine(Peek(-1)) 845Dim prevChar = Peek(-1) 994ch = Peek(len) 1030While CanGet(len) AndAlso IsWhitespace(Peek(len)) 1038While CanGet(len) AndAlso IsXmlWhitespace(Peek(len)) 1075Dim ch = Peek(i) 1080CanGet(i + 2) AndAlso MatchOneOrAnotherOrFullwidth(Peek(i + 1), "E"c, "e"c) AndAlso 1081MatchOneOrAnotherOrFullwidth(Peek(i + 2), "M"c, "m"c) Then 1083If Not CanGet(i + 3) OrElse IsNewLine(Peek(i + 3)) Then 1086ElseIf Not IsIdentifierPartCharacter(Peek(i + 3)) Then 1105Not IsNewLine(Peek(length)) 1176If CanGet(1) AndAlso BeginsBaseLiteral(Peek(1)) Then 1248If CanGet(1) AndAlso IsDecimalDigit(Peek(1)) Then 1296If CanGet(1) AndAlso IsIdentifierPartCharacter(Peek(1)) Then 1302If Not CanGet(len) OrElse IsNewLine(Peek(len)) OrElse PeekStartComment(len) > 0 Then 1321If Not fullWidth AndAlso CanGet(1) AndAlso IsDoubleQuote(Peek(1)) Then 1365eq = Peek(here) 1389Dim c As Char = Peek(length) 1414Dim c As Char = Peek(length) 1418Select Case (Peek(length + 1)) 1420If CanGet(length + 3) AndAlso Peek(length + 2) = "-"c Then 1443Dim c As Char = Peek(length) 1455c = Peek(length) 1508Dim ch1 = Peek(1) 1520ch = Peek(len) 1535ch = Peek(len) 1542Dim NextChar As Char = Peek(len + 1) 1632Dim ch = Peek(here) 1638IsIdentifierPartCharacter(Peek(here + 1)))) Then 1645Dim [Next] As Char = Peek(here) 1713ch = If(CanGet(here), Peek(here), ChrW(0)) 1722If CanGet(here) AndAlso Peek(here) = "_"c Then 1727ch = Peek(here) 1736UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1743If CanGet(here) AndAlso Peek(here) = "_"c Then 1748ch = Peek(here) 1757UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1764If CanGet(here) AndAlso Peek(here) = "_"c Then 1769ch = Peek(here) 1778UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1791UnderscoreInWrongPlace = (CanGet(here) AndAlso Peek(here) = "_"c) 1793ch = Peek(here) 1803UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1814ch = Peek(here) 1817IsDecimalDigit(Peek(here + 1)) Then 1823ch = Peek(here) 1829UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1835If CanGet(here) AndAlso BeginsExponent(Peek(here)) Then 1839ch = Peek(here) 1846If CanGet(here) AndAlso IsDecimalDigit(Peek(here)) Then 1849ch = Peek(here) 1855UnderscoreInWrongPlace = UnderscoreInWrongPlace Or (Peek(here - 1) = "_"c) 1873ch = Peek(here) 1950ch = Peek(here + 1) 1962Dim NextChar As Char = Peek(here + 1) 2003Dim LiteralCharacterValue As Char = Peek(LiteralCharacter) 2028Dim LiteralCharacterValue As Char = Peek(LiteralCharacter) 2079Dim curCh = Peek(i) 2167Dim ch = Peek(here) 2176ch = Peek(here) 2232If CanGet(here) AndAlso IsDateSeparatorCharacter(Peek(here)) Then 2253If CanGet(here) AndAlso IsDateSeparatorCharacter(Peek(here)) Then 2256If Peek(here) <> Peek(FirstDateSeparator) Then 2279If CanGet(here) AndAlso IsDateSeparatorCharacter(Peek(here)) Then 2282If Peek(here) <> Peek(FirstDateSeparator) Then 2322If CanGet(here) AndAlso IsColon(Peek(here)) Then 2335If CanGet(here) AndAlso IsColon(Peek(here)) Then 2351If Peek(here) = "A"c OrElse Peek(here) = FULLWIDTH_LATIN_CAPITAL_LETTER_A OrElse 2352Peek(here) = "a"c OrElse Peek(here) = FULLWIDTH_LATIN_SMALL_LETTER_A Then 2357ElseIf Peek(here) = "P"c OrElse Peek(here) = FULLWIDTH_LATIN_CAPITAL_LETTER_P OrElse 2358Peek(here) = "p"c OrElse Peek(here) = FULLWIDTH_LATIN_SMALL_LETTER_P Then 2366If Peek(here) = "M"c OrElse Peek(here) = FULLWIDTH_LATIN_CAPITAL_LETTER_M OrElse 2367Peek(here) = "m"c OrElse Peek(here) = FULLWIDTH_LATIN_SMALL_LETTER_M Then 2384If Not CanGet(here) OrElse Not IsHash(Peek(here)) Then 2497Dim ch As Char = Peek(here) 2504If Not CanGet(here) OrElse IsNewLine(Peek(here)) Then 2508Debug.Assert(IsHash(Peek(here))) 2525If CanGet(3) AndAlso IsDoubleQuote(Peek(2)) Then 2526If IsDoubleQuote(Peek(1)) Then 2527If IsDoubleQuote(Peek(3)) AndAlso 2529IsLetterC(Peek(4)) Then 2535ElseIf IsLetterC(Peek(3)) Then 2537Return MakeCharacterLiteralToken(precedingTrivia, Peek(1), 4) 2542IsDoubleQuote(Peek(1)) AndAlso 2543IsLetterC(Peek(2)) Then 2553ch = Peek(length) 2557ch = Peek(length + 1)
Scanner\ScannerInterpolatedString.vb (12)
30Dim c = Peek(offset) 37Debug.Assert(Not CanGet(offset + 1) OrElse Peek(offset + 1) <> c OrElse Not (IsLeftCurlyBracket(c) OrElse IsDoubleQuote(c)), "Escape sequence not detected.") 44If CanGet(offset + 1) AndAlso IsDoubleQuote(Peek(offset + 1)) Then 80Debug.Assert(Not CanGet(offset + 1) OrElse Not IsDoubleQuote(Peek(offset + 1))) 120Dim c = Peek(offset) 123Return Not CanGet(offset + 1) OrElse Not IsLeftCurlyBracket(Peek(offset + 1)) 126Return Not CanGet(offset + 1) OrElse Not IsRightCurlyBracket(Peek(offset + 1)) 133Return Not CanGet(offset + 1) OrElse Not IsDoubleQuote(Peek(offset + 1)) 149Dim c = Peek(offset) 156If CanGet(offset + 1) AndAlso IsLeftCurlyBracket(Peek(offset + 1)) Then 170If CanGet(offset + 1) AndAlso IsRightCurlyBracket(Peek(offset + 1)) Then 184If CanGet(offset + 1) AndAlso IsDoubleQuote(Peek(offset + 1)) Then
Scanner\ScannerXml.vb (29)
41c = Peek(len) 97If CanGet(1) AndAlso Peek(1) = ">" Then 118Dim ch As Char = Peek(1) 122Select Case (Peek(2)) 305Dim prevChar = Peek(-1) 314Dim c As Char = Peek(Here) 347Dim ch As Char = Peek(1) 351Select Case (Peek(2)) 497Dim c As Char = Peek(Here) 517c = Peek(Here + 2) 589Dim c As Char = Peek(Here) 665Dim c As Char = Peek(Here) 737Dim ch As Char = Peek(1) 801Dim c As Char = Peek(Here) 894Dim c As Char = Peek(Here) 994Debug.Assert(Peek(Here) = c1) 997Dim c2 = Peek(Here + 1) 1039Dim c = Peek(Here) 1071Dim c As Char = Peek(Here) 1139Dim c As Char = Peek(1) 1154If CanGet(Here) AndAlso Peek(Here) = ";"c Then 1168If Peek(4) = ";"c Then 1178If Peek(5) = ";"c Then 1192If Peek(3) = ";"c Then 1206If Peek(3) = ";"c Then 1220If Peek(5) = ";"c Then 1249Dim ch = Peek(Here) 1254ch = Peek(Here) 1271ch = Peek(Here)
Scanner\XmlDocComments.vb (8)
146Dim c = Peek(Here) 209c = Peek(len) 239Dim c As Char = Peek(Here) 280Dim ch As Char = Peek(1) 284Select Case (Peek(2)) 385Dim c As Char = Peek(Here) 504Dim ch As Char = Peek(1) 508Select Case (Peek(2))
Scanner\XmlTokenFactories.vb (1)
325Debug.Assert(Peek(1) = ">"c)