File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -258,6 +258,11 @@ impl Pre<()> {
258
258
if !info. props ( ) [ 0 ] . look_set ( ) . is_empty ( ) {
259
259
return None ;
260
260
}
261
+ // For a similar reason, we require that it has zero look-around
262
+ // expressions.
263
+ if info. props ( ) [ 0 ] . contains_lookaround_expr ( ) {
264
+ return None ;
265
+ }
261
266
// Finally, currently, our prefilters are all oriented around
262
267
// leftmost-first match semantics, so don't try to use them if the
263
268
// caller asked for anything else.
Original file line number Diff line number Diff line change @@ -172,8 +172,9 @@ impl Extractor {
172
172
use crate :: hir:: HirKind :: * ;
173
173
174
174
match * hir. kind ( ) {
175
- Empty | Look ( _) => Seq :: singleton ( self :: Literal :: exact ( vec ! [ ] ) ) ,
176
- LookAround ( _) => Seq :: infinite ( ) ,
175
+ Empty | Look ( _) | LookAround ( _) => {
176
+ Seq :: singleton ( self :: Literal :: exact ( vec ! [ ] ) )
177
+ }
177
178
Literal ( hir:: Literal ( ref bytes) ) => {
178
179
let mut seq =
179
180
Seq :: singleton ( self :: Literal :: exact ( bytes. to_vec ( ) ) ) ;
You can’t perform that action at this time.
0 commit comments