Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax errors on arrays of objects #11

Open
giacecco opened this issue Nov 10, 2012 · 1 comment
Open

Syntax errors on arrays of objects #11

giacecco opened this issue Nov 10, 2012 · 1 comment

Comments

@giacecco
Copy link

Coffeescript code like this:

arrayOfObjects = [
    'object1property1': "foo"
    'object1property2': "bar"
  ,
    'object2property1': "foo"
    'object2property2': 
      'object2property2subproperty1': "ba"
      'object2property2subproperty2': "r"
]

triggers strange syntax errors. On the comma I get

mismatched input ',' expecting RULE_RBRACKET

On the "object2property2" and "object2property2subproperty2" lines I get:

no viable alternative at input ':'

Is it the same problem as deeply nested properties described here? Thanks.

@devdandev
Copy link

I am also getting a similar problem with a line like this :

collections.campaign[@campaignID].leadsDialable += rows[0].num

The += has the error of "no viable alternative at input '+=' "
And the rows[ has the error of " missing RULE_OUTDENT at '[' "

Hope this helps.
Id love to be able to edit coffeescript from inside eclipse but as it stands im having to use sublime :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants