Commit 33043f13 authored by Camil Staps's avatar Camil Staps 🐧

Fix #1: uncomment code for groups in Regex.Parse

parent 31eced6f
......@@ -106,14 +106,14 @@ parse g rs ['[':'^':cs]
parse g rs ['[':cs]
= (\(cc,cs) -> (g, [|CharacterClass False cc:rs], cs)) <$> charClass [|] cs
/*parse g rs ['(':'?':':':cs] = app <$> inGroup g [|] cs
parse g rs ['(':'?':':':cs] = app <$> inGroup g [|] cs
where
app (g, [|], cs) = (g, rs, cs)
app (g, [|r], cs) = (g, [|r:rs], cs)
app (g, rs`, cs) = (g, [|Concat $ Reverse rs`:rs], cs)*/
app (g, rs`, cs) = (g, [|Concat $ Reverse rs`:rs], cs)
/*parse g rs ['(':cs] = (\(g`,rs`,cs) -> (g`, [|Group (NotNamed g) (cc rs`):rs], cs)) <$> inGroup (g+1) [|] cs
where cc [|r] = r; cc rs = Concat $ Reverse rs*/
parse g rs ['(':cs] = (\(g`,rs`,cs) -> (g`, [|Group (NotNamed g) (cc rs`):rs], cs)) <$> inGroup (g+1) [|] cs
where cc [|r] = r; cc rs = Concat $ Reverse rs
parse g rs cs
= (\(c,cs) -> (g, [|CharacterClass False c:rs],cs)) <$> shorthandClass cs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment