brackets-archive / bracketsIssues

Archive of issues in brackets.
0 stars 0 forks source link

Parsing error when using nullish coalescing operators #14843

Open core-ai-bot opened 2 years ago

core-ai-bot commented 2 years ago

Issue by DiriectorDoc Saturday Feb 13, 2021 at 03:38 GMT Originally opened as https://github.com/adobe/brackets/issues/15319


Prerequisites

For more information on how to write a good bug report read here For more information on how to contribute read here

Description

There is a syntax error when using nullish coalescing operators

Steps to Reproduce

  1. Create a new .js file
  2. Write these three lines
    var a,
    b = 7,
    c = a ?? b;
  3. See the error on line 3: ERROR: Parsing error: Unexpected token ?
  4. Similar errors occur when using ??= and ?.

Expected behavior: Nullish coalescing operators are not syntax errors. They have yet to become compatible with all browsers, but most of them support them.

Actual behavior: Because there are actual operators that exist, no error should occur.

Versions

MS Win10 Pro; 10.0.18363 build 18363 Adobe Brackets Release 1.14 build 1.14.2-17770 (release-1.14.2 f71f00acc)