|
|
@ -33,14 +33,12 @@ func (s State) contentContains(str []rune, idx int) bool {
|
|
|
|
if s.assert == EOS {
|
|
|
|
if s.assert == EOS {
|
|
|
|
return idx == len(str)
|
|
|
|
return idx == len(str)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.assert == WBOUND {
|
|
|
|
|
|
|
|
if s.assert == WBOUND {
|
|
|
|
if s.assert == WBOUND {
|
|
|
|
return isWordBoundary(str, idx)
|
|
|
|
return isWordBoundary(str, idx)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if s.assert == NONWBOUND {
|
|
|
|
if s.assert == NONWBOUND {
|
|
|
|
return !isWordBoundary(str, idx)
|
|
|
|
return !isWordBoundary(str, idx)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Default - s.assert must be NONE
|
|
|
|
// Default - s.assert must be NONE
|
|
|
|
return slices.Contains(s.content, int(str[idx]))
|
|
|
|
return slices.Contains(s.content, int(str[idx]))
|
|
|
|
}
|
|
|
|
}
|
|
|
|