Skip to content

Commit

Permalink
accept everything if regex filter empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dm0n3y committed Sep 26, 2024
1 parent e9b9e42 commit cc8c8a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/grammar/regex/RZipper.re
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,15 @@ let rec enter =

//Framed module elems pairs subject in focus with the context of the list
//Converts the list into a zipper structure
Lists.Framed.elems(List.filter(((nm, _)) => List.mem(nm, filter), s))
s
|> (
switch (filter) {
| [] => Fun.id
| [_, ..._] => List.filter(((nm, _)) => List.mem(nm, filter))
}
)
|> Lists.Framed.elems
// Lists.Framed.elems(List.filter(((nm, _)) => List.mem(nm, filter), s))
//r = element of list
//ls + rs = frame
//ls = list left of element
Expand Down

0 comments on commit cc8c8a0

Please sign in to comment.