Compile lookaround regex to avoid compiling each time we want to use it
This commit is contained in:
2
main.go
2
main.go
@@ -469,6 +469,8 @@ func thompson(re []postfixNode) *State {
|
|||||||
state.assert = NLB
|
state.assert = NLB
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
tmpRe := shuntingYard(state.lookaroundRegex)
|
||||||
|
state.lookaroundNFA = thompson(tmpRe)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user