pombreda / js2-mode

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

syntax highlighting breaks for object attributes named "class" #90

Open GoogleCodeExporter opened 9 years ago

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

with dojo JS toolkit you often do thins like this:

  var myTree = new dijit.Tree({
    id: "myTree",
    model: myModel,
    dndController: "dijit._tree.dndSource",
    class:"container"
  })

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

I expect syntax highlighting to work, but js2-el it doesn't like the
"class" property.

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

- using trunk of js2-el and trunk of aquamacs

Please provide any additional information below.

Original issue reported on code.google.com by rsaccon on 18 Aug 2008 at 1:28

GoogleCodeExporter commented 9 years ago
Class is a reserved word in javascript, but the mini-buffer error string doesn't
appear to be correct.

"missing ; before statement"

Original comment by waw...@gmail.com on 5 Oct 2008 at 1:55

GoogleCodeExporter commented 9 years ago
Now that I think about it, I think the mode was originally written to support
Javascript 2.0 which was going in the direction of supporting more traditional
inheritance through the use of classes, but it seems that this plan is no longer
going forward (google javascript harmony for more info). 

I bet the parser looks for Classes as they were defined in a 2.0 spec.

Original comment by waw...@gmail.com on 8 Oct 2008 at 10:28