Skip to content

Commit

Permalink
refactor to remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Apr 18, 2024
1 parent 1e4161f commit 8cf73b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions acorn/src/regexp.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class RegExpValidationState {
this.maxBackReference = 0
this.groupNames = Object.create(null)
this.backReferenceNames = []
this.alternative = null
}

reset(start, pattern, flags) {
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8cf73b1

Please sign in to comment.