Skip to content

Commit

Permalink
cleanup logs in lex_group.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jul 19, 2023
1 parent 7ef2d7e commit 4f4987c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/lex_group.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package passgen

import (
"log"
"strconv"
)

Expand Down Expand Up @@ -67,18 +66,10 @@ Loop:
pattern = append(pattern, c)
}
}
// s.absPos = s.absPos - uint(length) - 1
parts, indexList, err := splitArgsStr(pattern, '|')
if err != nil {
return nil, err
}
if length > s.absPos {
// FIXME: this happens
log.Printf(
"pattern=`%v`, s.pattern=`%v`, length=%v, absPos=%v",
string(pattern), string(s.input), length, s.absPos,
)
}
gen := &alterGenerator{
parts: parts,
indexList: indexList,
Expand Down Expand Up @@ -111,12 +102,6 @@ func processGroupEnd(s *State) (LexType, error) {
lastOutputSize := len(s.output)
s2 := NewState(s.SharedState.Copy(), s.input)
s2.output = s.output
if len(s.buff) > int(s.absPos) {
log.Printf(
"buff=%#v, len(buff)=%v, absPos=%v",
string(s.buff), len(s.buff), s.absPos,
)
}
s2.errorOffset -= int64(len(s.buff) + 1)
gen := newGroupGenerator(s.buff)
err := gen.Generate(s2)
Expand Down

0 comments on commit 4f4987c

Please sign in to comment.