| 671 | |
| 672 | |
| 673 | static int gmatch_aux (lua_State *L) { |
| 674 | GMatchState *gm = (GMatchState *)lua_touserdata(L, lua_upvalueindex(3)); |
| 675 | const char *src; |
| 676 | gm->ms.L = L; |
| 677 | for (src = gm->src; src <= gm->ms.src_end; src++) { |
| 678 | const char *e; |
| 679 | reprepstate(&gm->ms); |
| 680 | if ((e = match(&gm->ms, src, gm->p)) != NULL && e != gm->lastmatch) { |
| 681 | gm->src = gm->lastmatch = e; |
| 682 | return push_captures(&gm->ms, src, e); |
| 683 | } |
| 684 | } |
| 685 | return 0; /* not found */ |
| 686 | } |
| 687 | |
| 688 | |
| 689 | static int gmatch (lua_State *L) { |
nothing calls this directly
no test coverage detected