Remove unused parser methods (#10942)

* chore: remove unused isStrictBody

* chore: remove unused eatRelational
This commit is contained in:
Huáng Jùnliàng
2019-12-30 16:09:50 -05:00
committed by GitHub
parent 314513374d
commit 197a8da04d
3 changed files with 0 additions and 44 deletions

View File

@@ -1892,20 +1892,6 @@ export default class ExpressionParser extends LValParser {
);
}
isStrictBody(node: { body: N.BlockStatement }): boolean {
const isBlockStatement = node.body.type === "BlockStatement";
if (isBlockStatement && node.body.directives.length) {
for (const directive of node.body.directives) {
if (directive.value.value === "use strict") {
return true;
}
}
}
return false;
}
parseFunctionBodyAndFinish(
node: N.BodilessFunctionOrMethodBase,
type: string,

View File

@@ -58,16 +58,6 @@ export default class UtilParser extends Tokenizer {
}
}
// eat() for relational operators.
eatRelational(op: "<" | ">"): boolean {
if (this.isRelational(op)) {
this.next();
return true;
}
return false;
}
// Tests whether parsed token is a contextual keyword.
isContextual(name: string): boolean {