Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
Use the string "module" in err message (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzoo authored Jun 28, 2017
1 parent 03b3b39 commit f7547fd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/parser/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ export default class ExpressionParser extends LValParser {
const id = this.parseIdentifier(true);
this.expect(tt.dot);
if (!this.inModule) {
this.raise(id.start, "import.meta may appear only with 'sourceType: module'");
this.raise(id.start, `import.meta may appear only with 'sourceType: "module"'`);
}
return this.parseMetaProperty(node, id, "meta");
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser/statement.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class StatementParser extends ExpressionParser {
}

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
Original file line number Diff line number Diff line change
@@ -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)"
}
Original file line number Diff line number Diff line change
@@ -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)"
}
Original file line number Diff line number Diff line change
@@ -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)"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"throws": "import.meta may appear only with 'sourceType: module' (1:10)",
"throws": "import.meta may appear only with 'sourceType: \"module\"' (1:10)",
"plugins": ["dynamicImport", "importMeta"],
"sourceType": "script"
}

0 comments on commit f7547fd

Please sign in to comment.