Skip to content

Commit

Permalink
Fix whitespace error location
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Jan 28, 2019
1 parent aac75a2 commit 8e23611
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/babel-parser/src/parser/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class UtilParser extends Tokenizer {
// Throws if the current token and the prev one are separated by a space.
assertNoSpace(message: string = "Unexpected space."): void {
if (this.state.start > this.state.lastTokEnd) {
this.raise(this.state.start, message);
this.raise(this.state.lastTokEnd, message);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"throws": "Unexpected space between # and identifier (2:5)",
"throws": "Unexpected space between # and identifier (2:3)",
"plugins": ["classPrivateMethods"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"throws": "Unexpected space between # and identifier (2:5)",
"throws": "Unexpected space between # and identifier (2:3)",
"plugins": ["classPrivateMethods"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"plugins": ["placeholders"],
"throws": "Unexpected space in placeholder. (1:6)"
"throws": "Unexpected space in placeholder. (1:5)"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"plugins": ["placeholders"],
"throws": "Unexpected space in placeholder. (1:3)"
"throws": "Unexpected space in placeholder. (1:2)"
}

0 comments on commit 8e23611

Please sign in to comment.