summaryrefslogtreecommitdiff
path: root/lib/regex
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-01-03 15:46:38 -0800
committerOri Bernstein <ori@markovcorp.com>2017-01-03 15:46:38 -0800
commit24020b49aee678a72f3d9883371af8c70e4af9a5 (patch)
tree9c569dfc4d6890a72a4795f1d184433a4d8ee6bb /lib/regex
parente7ba66a1d2698910fcc0ba4aeadff491fb0ead94 (diff)
downloadmc-24020b49aee678a72f3d9883371af8c70e4af9a5.tar.gz
Add regex escaping.
Diffstat (limited to 'lib/regex')
-rw-r--r--lib/regex/compile.myr1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/regex/compile.myr b/lib/regex/compile.myr
index 5a717ce..5228d08 100644
--- a/lib/regex/compile.myr
+++ b/lib/regex/compile.myr
@@ -651,6 +651,7 @@ const escaped = {re
| 'r': ret = `Some mk(re, `Chr '\r', idx)
| 'n': ret = `Some mk(re, `Chr '\n', idx)
| 'b': ret = `Some mk(re, `Chr '\b', idx)
+ | ')': ret = `Some mk(re, `Chr ')', idx)
| 'u': ret = unichar(re, idx)
| chr: ret = `Err `Badescape chr
;;