yoya / js2-mode

Automatically exported from code.google.com/p/js2-mode
0 stars 0 forks source link

Continue label to iteration statement yields unexpected syntax error. #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. In js2-mode, edit a file with this function:

   function tst() {
     var result = "";
     var as = [1, 2];
     var bs = [10, 20];
     iter_label: for (var ai in as) {
       var a = as[ai];
       for (var bi in bs) {
         var b = bs[bi];
         if (a+b == 11)
           continue iter_label;
         result = result + (a + b) + " ";
       }
     }
     alert(result);
   }

What is the expected output? What do you see instead?

2. Expected no complaint; got the following gripe instead:

  "continue can only use labels of iteration statements"

What version of the product are you using? On what operating system?

  20080521
  Windows XP
  GNU Emacs 22.2.1 (i386-mingw-nt5.1.2600) of 2008-03-26 on RELEASE

Please provide any additional information below.

  Spec and Firefox 3 RC seem to be fine with given continue/label
  syntax.

Original issue reported on code.google.com by kenneth....@gmail.com on 28 May 2008 at 3:22

GoogleCodeExporter commented 8 years ago
Fixed as of 20080615a.

Original comment by steve.ye...@gmail.com on 16 Jun 2008 at 3:34