forked from jashkenas/coffeescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw an error if an import or export statement isn’t at the top-leve…
…l scope, with tests
- Loading branch information
1 parent
be49dc0
commit 3eb4533
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1243,6 +1243,9 @@ exports.Module = class Module extends Base | |
makeReturn: THIS | ||
|
||
compileNode: (o) -> | ||
if o.indent.length isnt 0 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
GeoffreyBooth
Author
Owner
|
||
@error "#{@type} statements must be at top-level scope" | ||
|
||
code = [] | ||
|
||
code.push @makeCode "#{@tab}#{@type} " | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I think this should be
if o.scope.parent
.