(L *LState, m *pm.MatchData, idx int)
| 179 | } |
| 180 | |
| 181 | func checkCaptureIndex(L *LState, m *pm.MatchData, idx int) { |
| 182 | if idx <= 2 { |
| 183 | return |
| 184 | } |
| 185 | if idx >= m.CaptureLength() { |
| 186 | L.RaiseError("invalid capture index") |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | func capturedString(L *LState, m *pm.MatchData, str string, idx int) string { |
| 191 | checkCaptureIndex(L, m, idx) |
no test coverage detected
searching dependent graphs…