Updated assertion constants so that they aren't exported
This commit is contained in:
@@ -871,30 +871,30 @@ func thompson(re []postfixNode) (Reg, error) {
|
||||
if c.lookaroundDir == 0 || c.lookaroundSign == 0 {
|
||||
switch c.contents[0] {
|
||||
case '^':
|
||||
state.assert = SOS
|
||||
state.assert = sosAssert
|
||||
case '$':
|
||||
state.assert = EOS
|
||||
state.assert = eosAssert
|
||||
case 'b':
|
||||
state.assert = WBOUND
|
||||
state.assert = wboundAssert
|
||||
case 'B':
|
||||
state.assert = NONWBOUND
|
||||
state.assert = nonwboundAssert
|
||||
}
|
||||
} else { // Lookaround
|
||||
state.lookaroundRegex = string(c.contents)
|
||||
if c.lookaroundDir == lookahead {
|
||||
if c.lookaroundSign == positive {
|
||||
state.assert = PLA
|
||||
state.assert = plaAssert
|
||||
}
|
||||
if c.lookaroundSign == negative {
|
||||
state.assert = NLA
|
||||
state.assert = nlaAssert
|
||||
}
|
||||
}
|
||||
if c.lookaroundDir == lookbehind {
|
||||
if c.lookaroundSign == positive {
|
||||
state.assert = PLB
|
||||
state.assert = plbAssert
|
||||
}
|
||||
if c.lookaroundSign == negative {
|
||||
state.assert = NLB
|
||||
state.assert = nlbAssert
|
||||
}
|
||||
}
|
||||
tmpRe, err := shuntingYard(state.lookaroundRegex)
|
||||
@@ -919,7 +919,7 @@ func thompson(re []postfixNode) (Reg, error) {
|
||||
}
|
||||
if c.nodetype == lparenNode || c.nodetype == rparenNode {
|
||||
s := &State{}
|
||||
s.assert = NONE
|
||||
s.assert = noneAssert
|
||||
s.content = newContents(EPSILON)
|
||||
s.isEmpty = true
|
||||
s.output = make([]*State, 0)
|
||||
|
Reference in New Issue
Block a user