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

Fix ns export when between a default export and exported specifiers. #162

Merged
merged 7 commits into from
May 15, 2017
Merged

Fix ns export when between a default export and exported specifiers. #162

merged 7 commits into from
May 15, 2017

Conversation

jdalton
Copy link
Contributor

@jdalton jdalton commented May 13, 2017

Hey @benjamn. I found this bug but the \babylon compiler. Its having problems with:

export def4, * as ns4, { c as e } from "../misc/abc";

The acorn parser works because of our extension (bug fix).

I've skipped the from-extensions from other babylon specific tests, but it will still error when using the babylon parser (the first iteration of the run.sh).

@jdalton jdalton added the bug label May 13, 2017
@@ -156,10 +160,6 @@ function parseExportSpecifiersMaybe(parser, node) {
}
}

function peekNextType(parser) {
return peekNextWith(parser, () => parser.type);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug was we were passing () => parser.type instead of (p) => p.type.

@jdalton
Copy link
Contributor Author

jdalton commented May 15, 2017

It turns out by spec order is significant, but I think that's goofy. I'll pull babylon until a proposal lands to support unordered import/export.

@jdalton jdalton merged commit 0953c18 into benjamn:master May 15, 2017
@jdalton jdalton deleted the export-ns-bug branch May 15, 2017 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant