Open
Description
Describe the bug
Since empty groups such as []
or [^\s\S]
are forbidden in Rust, Pomsky tries its best to detect them and show an error. However, this is currently far from comprehensive.
To Reproduce
Try to compile any of these with the regex
crate:
![w !d]
[!w !s]
[!Latin !s]
[U+00-U+10FFFF]
There are many more cases, and catching all requires some refactoring.
Expected behavior
This error should also be emitted for the above cases:
error P0307(resolve):
× This negated character class matches nothing
╭────
1 │ ![s !s]
· ───┬──
· ╰── error occurred here
╰────