-
Notifications
You must be signed in to change notification settings - Fork 50
Overhaul quantification optimizations #710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c2b93ab
b48f09e
efd4a1d
45b4da3
eb6e0e0
3fe6fe2
1687315
15706a4
01177fa
e5ee845
2d7a391
4c3ebf0
3c5dea0
50b2f91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,6 +223,25 @@ extension String { | |
else { return nil } | ||
return next | ||
} | ||
|
||
internal func matchRegexDot( | ||
at currentPosition: Index, | ||
limitedBy end: Index, | ||
anyMatchesNewline: Bool, | ||
isScalarSemantics: Bool | ||
) -> Index? { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we still making distinctions between the If this method is just for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the leaf function which provides the implementation. The |
||
guard currentPosition < end else { return nil } | ||
|
||
if anyMatchesNewline { | ||
return index( | ||
after: currentPosition, isScalarSemantics: isScalarSemantics) | ||
} | ||
|
||
return matchAnyNonNewline( | ||
at: currentPosition, | ||
limitedBy: end, | ||
isScalarSemantics: isScalarSemantics) | ||
} | ||
} | ||
|
||
// MARK: - Built-in character class matching | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the story here — does the bounds check always happen before the consume function is called? Or is there a post-advancement check to make sure we haven't gone beyond the bounds of the search range?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't change the behavior. Let's open an issue for that