Skip to content

Commit d5ff493

Browse files
committed
add raw character char sets and ranges
1 parent 9ad21ac commit d5ff493

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

common/mik_parser.mly

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,3 +268,9 @@ char_set_item:
268268
| INT { $1 }
269269
| PREDEFINED_CLASS { $1 }
270270
| IDENT { $1 }
271+
| IDENT DASH IDENT {
272+
if String.length $1 = 1 && String.length $3 = 1 then
273+
$1 ^ "-" ^ $3
274+
else
275+
syntax_error "ranges must be single characters" $startpos($2) $endpos
276+
}

0 commit comments

Comments
 (0)