Updated struct field reference

master
Aadhavan Srinivasan 3 days ago
parent 1a2f1b7ca9
commit c06d81d17d

@ -150,12 +150,12 @@ func (s State) checkAssertion(str []rune, idx int) bool {
numMatchesFound := 0 numMatchesFound := 0
for _, matchIdx := range matchIndices { for _, matchIdx := range matchIndices {
if s.assert == PLA || s.assert == NLA { // Lookahead - return true (or false) if at least one match starts at 0. Zero is used because the test-string _starts_ from idx. if s.assert == PLA || s.assert == NLA { // Lookahead - return true (or false) if at least one match starts at 0. Zero is used because the test-string _starts_ from idx.
if matchIdx[0].startIdx == 0 { if matchIdx[0].StartIdx == 0 {
numMatchesFound++ numMatchesFound++
} }
} }
if s.assert == PLB || s.assert == NLB { // Lookbehind - return true (or false) if at least one match _ends_ at the current index. if s.assert == PLB || s.assert == NLB { // Lookbehind - return true (or false) if at least one match _ends_ at the current index.
if matchIdx[0].endIdx == idx { if matchIdx[0].EndIdx == idx {
numMatchesFound++ numMatchesFound++
} }
} }

Loading…
Cancel
Save