mathiasrw / closure-linter

Automatically exported from code.google.com/p/closure-linter
Apache License 2.0
0 stars 0 forks source link

Support for label? #42

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Create a file with 
a:{ 1; }

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

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

Please provide any additional information below.

Support for javascript labels seem to be missing. It looks like the ":" create 
an object context instead of a block context. A quick fix is adding 

          (self._last_code.IsOperator(':') and
           self._last_code.metadata.context.type != EcmaContext.OBJECT_LITERAL) or

in ecmametadatapass.py line 346

Original issue reported on code.google.com by marcbelm...@gmail.com on 20 Apr 2012 at 7:37