-
Notifications
You must be signed in to change notification settings - Fork 0
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
uncommented out class module stuff #2
base: modules
Are you sure you want to change the base?
Conversation
looking good, but tests are missing. We need to add tests for:
that's from the top of my head... |
k added all of those tests |
"index": 21, | ||
"lineNumber": 1, | ||
"column": 22, | ||
"description": "Unexpected reserved word" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, this one is certainly valid :), there is something wrong with the code, maybe on my code :)
this is sugar for:
var foo = class extends bar {};
export default foo;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just generated the tests with espree, let me try to turn back on esprima-fb and see if that works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esprima-fb gives:
module.exports = {
"index": 0,
"lineNumber": 1,
"column": 1,
"description": "Illegal export declaration"
}
for: export default class extends bar {};
acorn gives a fairly different AST IMO:
{
"type": "Program",
"start": 0,
"end": 36,
"body": [
{
"type": "ExportDeclaration",
"start": 0,
"end": 36,
"declaration": {
"type": "ClassExpression",
"start": 15,
"end": 35,
"id": null,
"superClass": {
"type": "Identifier",
"start": 29,
"end": 32,
"name": "bar"
},
"body": {
"type": "ClassBody",
"start": 33,
"end": 35,
"body": []
}
},
"default": true,
"specifiers": null,
"source": null
}
]
}
dude, you really need an editor that automatically add the breakline at the end jajajaja. those red arrows are hurting my eyes jajaja. |
@caridy yeah what do you want me to do about this breakline stuff? Happy to do whatever you want. I'm on mac/webstorm. |
Let me know what else is needed here. That seemed way too easy.