fix typo: identifer -> identifier (#10647)

This commit is contained in:
Leonid Shevtsov 2019-11-06 10:13:08 +02:00 committed by Nicolò Ribaudo
parent 2640e5a27c
commit 2cd5ad0c80
3 changed files with 3 additions and 3 deletions

View File

@ -197,7 +197,7 @@ describe("generation", function() {
const id2 = fn.body.body[0].expression;
id2.name += "2";
id2.loc.identiferName = "bar";
id2.loc.identifierName = "bar";
const generated = generate(
ast,

View File

@ -384,7 +384,7 @@ export default class ExpressionParser extends LValParser {
* so for ?? operator we need to check in this case the right expression to have parenthesis
* second case a && b ?? c
* here a && b => This is considered as a logical expression in the ast tree
* c => identifer
* c => identifier
* so now here for ?? operator we need to check the left expression to have parenthesis
* if the parenthesis is missing we raise an error and throw it
*/

View File

@ -407,7 +407,7 @@ defineType("Identifier", {
name: {
validate: chain(function(node, key, val) {
if (!isValidIdentifier(val)) {
// throw new TypeError(`"${val}" is not a valid identifer name`);
// throw new TypeError(`"${val}" is not a valid identifier name`);
}
}, assertValueType("string")),
},