pombreda / js2-mode

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

Object properties 'default' and 'return' screwing up parsing? #79

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The syntax coloring is broken for code like:

var o = {
    default: 1,
    return: 2
};

Even though it is valid JS code.

Original issue reported on code.google.com by anfedorov on 7 Jun 2008 at 7:02

GoogleCodeExporter commented 9 years ago
add this to your .emacs file:

(setq js2-allow-keywords-as-property-names t)

and it'll fix it.

I think I'll change this variable to the default in a future release.

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

GoogleCodeExporter commented 9 years ago

Original comment by steve.ye...@gmail.com on 16 Jun 2008 at 8:04