| 192 | |
| 193 | |
| 194 | static int capture_to_close (MatchState *ms) { |
| 195 | int level = ms->level; |
| 196 | for (level--; level>=0; level--) |
| 197 | if (ms->capture[level].len == CAP_UNFINISHED) return level; |
| 198 | return luaL_error(ms->L, "invalid pattern capture"); |
| 199 | } |
| 200 | |
| 201 | |
| 202 | static const char *classend (MatchState *ms, const char *p) { |
no test coverage detected