Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCaml backend: render case ranges compactly for char type.
OCaml supports character ranges like 'a'..'z', but it does not support numeric ranges like 0..9, therefore previously all ranges were rendered in expanded form, like 'a'|'b'|'c'|...|'z'. This results in sometimes very long lines with a lot of alternatives in match expressions. This commit fixes it by adding a conditional into syntax file definition. It checks if the range is of char type. If so, then the range is rendered compactly.
- Loading branch information