Skip to content

Commit

Permalink
fix the error info of 'sourceType' (babel#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackmiaool authored and hzoo committed Jun 28, 2017
1 parent c7292a7 commit f199a61
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/parser/statement.js
Expand Up @@ -105,7 +105,7 @@ pp.parseStatement = function (declaration, topLevel) {
}

if (!this.inModule) {
this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: module'");
this.raise(this.state.start, "'import' and 'export' may appear only with 'sourceType: \"module\"'");
}
}
return starttype === tt._import ? this.parseImport(node) : this.parseExport(node);
Expand Down
@@ -1,3 +1,3 @@
{
"throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
"throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)"
}
@@ -1,3 +1,3 @@
{
"throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
"throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)"
}
@@ -1,3 +1,3 @@
{
"throws": "'import' and 'export' may appear only with 'sourceType: module' (1:0)"
"throws": "'import' and 'export' may appear only with 'sourceType: \"module\"' (1:0)"
}

0 comments on commit f199a61

Please sign in to comment.