Updated references to 'epsilon'

This commit is contained in:
2025-01-30 10:38:26 -05:00
parent 7aee4280cc
commit be60f2fb51
2 changed files with 5 additions and 5 deletions

View File

@@ -867,7 +867,7 @@ func thompson(re []postfixNode) (Reg, error) {
stateToAdd.isEmpty = false
if c.nodetype == assertionNode {
stateToAdd.isEmpty = true // This is a little weird. A lookaround has the 'isEmpty' flag set, even though it _isn't_ empty (the contents are the regex). But, there's so much error-checking that relies on this flag that it's better to keep it this way.
stateToAdd.content = newContents(EPSILON) // Ideally, an assertion shouldn't have any content, since it doesn't say anything about the content of string
stateToAdd.content = newContents(epsilon) // Ideally, an assertion shouldn't have any content, since it doesn't say anything about the content of string
if c.lookaroundDir == 0 || c.lookaroundSign == 0 {
switch c.contents[0] {
case '^':
@@ -920,7 +920,7 @@ func thompson(re []postfixNode) (Reg, error) {
if c.nodetype == lparenNode || c.nodetype == rparenNode {
s := &nfaState{}
s.assert = noneAssert
s.content = newContents(EPSILON)
s.content = newContents(epsilon)
s.isEmpty = true
s.output = make([]*nfaState, 0)
s.output = append(s.output, s)