MCPcopy Create free account
hub / github.com/yuin/gopher-lua / addPosCapture

Method addPosCapture

pm/pm.go:53–59  ·  view source on GitHub ↗
(s, pos int)

Source from the content-addressed store, hash-verified

51func newMatchState() *MatchData { return &MatchData{[]uint32{}} }
52
53func (st *MatchData) addPosCapture(s, pos int) {
54 for s+1 >= len(st.captures) {
55 st.captures = append(st.captures, 0)
56 }
57 st.captures[s] = (uint32(pos) << 1) | 1
58 st.captures[s+1] = (uint32(pos) << 1) | 1
59}
60
61func (st *MatchData) setCapture(s, pos int) uint32 {
62 for s >= len(st.captures) {

Callers 1

recursiveVMFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected