We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d35a61 commit cfbfbe7Copy full SHA for cfbfbe7
lib/emacs.ml
@@ -25,6 +25,12 @@ module Re = Core
25
exception Parse_error
26
exception Not_supported
27
28
+let by_code f c c' =
29
+ let c = Char.code c in
30
+ let c' = Char.code c' in
31
+ Char.chr (f c c')
32
+;;
33
+
34
let parse s =
35
let buf = Parse_buffer.create s in
36
let accept = Parse_buffer.accept buf in
@@ -105,6 +111,7 @@ let parse s =
105
111
then Re.char c :: Re.char '-' :: s
106
112
else (
107
113
let c' = char () in
114
+ let c' = by_code Int.max c c' in
108
115
bracket (Re.rg c c' :: s))
109
116
else bracket (Re.char c :: s))
110
117
and char () =
0 commit comments