We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode detects some syntax errors in RegExps in JS (e.g. /[/ gets squiggles and a helpful message on hover), but it misses many others
/[/
As you know, in JS (And thus TS), Unicode regexps have a grammar that's incompatible with legacy, non-u ones, and it should be taken into account.
All of these are invalid, but are not marked as such:
/\b+/ // can't quantify assertions
/^+/ // can't quantify assertions
/$+/ // can't quantify assertions
/(?<=)+/ // can't quantify assertions
/(?=)+/u // can't quantify look ahead assertions in u mode
/]/u // syntax characters must be escaped in u mode
/{a}/u // syntax characters must be escaped in u mode
/\-/u // non-syntax characters must not be escaped in u mode
/\1/u // orphan back reference in u mode
/\k<OrphanNameRefWithUFlag>/u
The text was updated successfully, but these errors were encountered:
As mentioned in microsoft/vscode#148612, I'm working on a RegExp tokenizer that may be useful to implement this.
Sorry, something went wrong.
Duplicate of #3432
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
VSCode detects some syntax errors in RegExps in JS (e.g.
/[/
gets squiggles and a helpful message on hover), but it misses many othersAs you know, in JS (And thus TS), Unicode regexps have a grammar that's incompatible with legacy, non-u ones, and it should be taken into account.
All of these are invalid, but are not marked as such:
/\k<OrphanNameRefWithUFlag>/u
The text was updated successfully, but these errors were encountered: