quick-lint/quick-lint-js

12$: warn on combining characters in regexp character classes

strager opened this issue · 3 comments

Hi @strager,
I would be interested in tackling this issue :)
Are strings within the parser encoded in any specific format (UTF-8, UTF-16**) or does it need to be able to "catch-all"?

Hi @strager,
Sorry for the ping, just wondering if there was any update on this?
Thanks :)

Are strings within the parser encoded in any specific format (UTF-8, UTF-16**) or does it need to be able to "catch-all"?

Within quick-lint-js's parser, source code is in UTF-8.

Here's the code which detects character classes in regexps:

It's bare-bones because we don't do anything with the character classes currently. Feel free to rip it apart to implement this diagnostic.