-
Notifications
You must be signed in to change notification settings - Fork 23
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
Exception parsing object with class
as key
#31
Comments
This is related to the widly reported issue in slimit (first in rspivak/slimit#52, then rspivak/slimit#59, rspivak/slimit#81, rspivak/slimit#90) where slimit fails to parse reserved keywords as bare keys occurring inside objects and as attributes. This was fixed in >>> from calmjs.parse import es5
>>> es5('var x = {class: 4};')
<ES5Program @1:1 ?children=[
<VarStatement @1:1 ?children=[
<VarDecl @1:5 identifier=<Identifier ...>, initializer=<Object ...>>
]>
]> |
@redapple Would moving to |
@Gallaecio , I believe so. If someone wants to give a shot at it. I don't know how easy the |
The "visitor" pattern can still be used, however certain class names for the nodes have changed (e.g. |
outputs:
The text was updated successfully, but these errors were encountered: