This PR makes it so that JS.toLiteral will always allow unicode: false. This means that it will automatically convert Unicode regexes into UTF16 regexes.
I implemented the basic framework but there are still some open questions:
Am I allowed to assume stable sorting?
~Can I just copy over the i flag from the Unicode regex?~ A: No.
~Does the detection for built-in assertions still work?~ A: Now it does.
~Also, this needs a bunch of testing.~ Other people build libraries just for the Unicode char set to UTF16 char set conversion.
This resolves #47.
This branch is branched from #42.
This PR makes it so that
JS.toLiteral
will always allowunicode: false
. This means that it will automatically convert Unicode regexes into UTF16 regexes.I implemented the basic framework but there are still some open questions:
i
flag from the Unicode regex?~ A: No.~Also, this needs a bunch of testing.~ Other people build libraries just for the Unicode char set to UTF16 char set conversion.