Small glitch in JS regex parsing

(using latest v6)
This is really small, but should be fixed anyway (as it may hide something else more important).

In a JS file, entering a regex like

var re = /abc{3}/;

makes the '}' underlined like it was a syntax error.
Comment actions Permalink


No syntax errors for me, could you please write what error message appears? Screenshot will be appreciated.

Comment actions Permalink

This is a screenshot I just took from a new file test.js (same display, with or without the "use strict"; statement)
There is no syntax error - just the '}' that appears underlined like it was an error(?).

Comment actions Permalink

Was wondering if the glitch is confirmed..?

Another small glitch in PHP syntax, this time ... Did a 'switch' using copy paste for the 'default' part (was a 'else'). Then fixed the 'else' => 'default: ' and the statement was 'unreachable code' (I had to retype the line to get the error disappear).
So I created a sample that you can try

          $a = $_GET('sadasd');
          switch($a) {
               case 'a': echo 10; break;
               case 'b': echo 20; break;
               case 'c': echo 30; break;
               else echo 50;

The 'echo 50' is 'unreachable statement' - ok, the 'else' is wrong anyway. So I fixed, replaced the 'else' with 'default: ' and the error persisted

               default: echo 50;

Not that important either...


Please sign in to leave a comment.