From 33f414f22eb17c7f298605c018fa0c094e43a10c Mon Sep 17 00:00:00 2001 From: ota-meshi Date: Thu, 18 Apr 2024 09:33:15 +0900 Subject: [PATCH] refactor to remove unnecessary code --- acorn/src/regexp.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/acorn/src/regexp.js b/acorn/src/regexp.js index 1f6373287..eaebceb14 100644 --- a/acorn/src/regexp.js +++ b/acorn/src/regexp.js @@ -50,7 +50,6 @@ export class RegExpValidationState { this.maxBackReference = 0 this.groupNames = Object.create(null) this.backReferenceNames = [] - this.alternative = null } reset(start, pattern, flags) { @@ -228,7 +227,7 @@ pp.regexp_pattern = function(state) { // https://www.ecma-international.org/ecma-262/8.0/#prod-Disjunction pp.regexp_disjunction = function(state) { let trackDisjunction = this.options.ecmaVersion >= 16 - if (trackDisjunction) state.branchID = new BranchID(state.branchID, null, 0) + if (trackDisjunction) state.branchID = new BranchID(state.branchID, null) this.regexp_alternative(state) while (state.eat(0x7C /* | */)) { if (trackDisjunction) state.branchID = state.branchID.sibling()