| 1895 | |
| 1896 | |
| 1897 | static int pushallvalues (CapState *cs, int addextra) { |
| 1898 | Capture *co = cs->cap; |
| 1899 | int n = 0; |
| 1900 | if (isfullcap(cs->cap++)) { |
| 1901 | pushsubject(cs, co); /* push whole match */ |
| 1902 | return 1; |
| 1903 | } |
| 1904 | while (!isclosecap(cs->cap)) |
| 1905 | n += pushcapture(cs); |
| 1906 | if (addextra || n == 0) { /* need extra? */ |
| 1907 | lua_pushlstring(cs->L, co->s, cs->cap->s - co->s); /* push whole match */ |
| 1908 | n++; |
| 1909 | } |
| 1910 | cs->cap++; /* skip close entry */ |
| 1911 | return n; |
| 1912 | } |
| 1913 | |
| 1914 | |
| 1915 | static Capture *findback (CapState *cs, Capture *cap) { |
no test coverage detected