Skip to content
New issue

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

ECMAScript syntax: Comment affecting semantics of RegExp #750

Closed
SMotaal opened this issue May 12, 2019 · 0 comments
Closed

ECMAScript syntax: Comment affecting semantics of RegExp #750

SMotaal opened this issue May 12, 2019 · 0 comments
Assignees

Comments

@SMotaal
Copy link

SMotaal commented May 12, 2019

  • VSCode Version: Version 1.33.1 (1.33.1)
  • OS Version: macOS 10.14.4 (18E226)

Steps to Reproduce:

The following is contrived to show this particular case.

/* prettier-ignore */
const dummy  = (div, g) => {
  ( []              /([(div)])/g / [] );
  ( ([])            /([(div)])/g / [] );
  ( [] /* */        /([(div)])/g / [] );
};
  1. Paste this code into a new javascript file
  2. Ignore any type-specific errors (because it is still valid ES syntax)
  3. Note the last statement highlights as RegExp but still tokenizes correctly by tsserver.

Does this issue occur when all extensions are disabled?: Not tested

@mjbvz mjbvz transferred this issue from microsoft/vscode May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants