提交 ae2f2834 编写于 作者: A AdamSpeight2008

NextAre implementation change.

Using a different implementation, for clarity.
上级 6396a558
......@@ -393,13 +393,11 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Private Function NextAre(offset As Integer, chars As String) As Boolean
Debug.Assert(Not String.IsNullOrEmpty(chars))
Dim n = chars.Length
Dim i = -1
If CanGetCharAtOffset(offset + n) Then
Do
i += 1
Loop While i < n AndAlso chars(i) = PeekAheadChar(offset + i)
End If
Return i = n
If Not CanGetCharAtOffset(offset + n) Then Return False
For i = 0 To n - 1
If chars(i) <> PeekAheadChar(offset + i) Then Return False
Next
Return True
End Function
Private Function CanGetChar() As Boolean
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册