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

Method setCapture

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

Source from the content-addressed store, hash-verified

59}
60
61func (st *MatchData) setCapture(s, pos int) uint32 {
62 for s >= len(st.captures) {
63 st.captures = append(st.captures, 0)
64 }
65 v := st.captures[s]
66 st.captures[s] = (uint32(pos) << 1)
67 return v
68}
69
70func (st *MatchData) restoreCapture(s int, pos uint32) { st.captures[s] = pos }
71

Callers 1

recursiveVMFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected