Rephrase parser error message (#11208)

* refactor: rephrase some parser error messages

* update test fixtures

* Update packages/babel-parser/src/parser/location.js

Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>

* address review comments

* Update packages/babel-parser/src/parser/location.js

Co-Authored-By: Brian Ng <bng412@gmail.com>

* update test fixtures

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
This commit is contained in:
Huáng Jùnliàng
2020-03-16 21:48:32 -04:00
committed by GitHub
parent 8e7ca22ed7
commit 841f4428e8
35 changed files with 76 additions and 73 deletions

View File

@@ -104,9 +104,8 @@ const FlowErrors = Object.freeze({
UnexpectedReservedType: "Unexpected reserved type %0",
UnexpectedReservedUnderscore:
"`_` is only allowed as a type argument to call or new",
//todo: replace ´ by `
UnexpectedSpaceBetweenModuloChecks:
"Spaces between ´%´ and ´checks´ are not allowed here.",
"Spaces between `%` and `checks` are not allowed here.",
UnexpectedSpreadType:
"Spread operator cannot appear in class or interface definitions",
UnexpectedSubtractionOperand: