File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Sources/_MatchingEngine/Engine Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,12 @@ extension Processor {
93
93
}
94
94
95
95
extension Processor {
96
+ var slice : Input . SubSequence {
97
+ // TODO: Should we whole-scale switch to slices, or
98
+ // does that depend on options for some anchors?
99
+ input [ bounds]
100
+ }
101
+
96
102
// Advance in our input
97
103
//
98
104
// Returns whether the advance succeeded. On failure, our
@@ -125,7 +131,7 @@ extension Processor {
125
131
currentPosition < end ? input [ currentPosition] : nil
126
132
}
127
133
func load( count: Int ) -> Input . SubSequence ? {
128
- let slice = input [ currentPosition... ] . prefix ( count)
134
+ let slice = self . slice [ currentPosition... ] . prefix ( count)
129
135
guard slice. count == count else { return nil }
130
136
return slice
131
137
}
You can’t perform that action at this time.
0 commit comments