microsoft / TypeScript-TmLanguage

TextMate grammar files for TypeScript for VS Code, Sublime Text, and Atom.
MIT License
397 stars 125 forks source link

Support the RegExp `v` flag #1006

Open BenjaminAster opened 6 months ago

BenjaminAster commented 6 months ago

The RegExp v flag (a.k.a. RegExp.prototype.unicodeSets) is now in the main ECMAScript standard and supported across all modern browsers, but TypeScript/JavaScript syntax highlighting breaks when using it. Supporting it should work similarly to https://github.com/microsoft/TypeScript-TmLanguage/pull/862.

5. If F contains any code unit other than "d", "g", "i", "m", "s", "u", "v", or "y", or if F contains any code unit more than once, throw a SyntaxError exception. (see also https://tc39.es/ecma262/multipage/text-processing.html#sec-regexpinitialize)