MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / pushallvalues

Function pushallvalues

other_src/lua/src/lpeg.cpp:1897–1912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1895
1896
1897static 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
1915static Capture *findback (CapState *cs, Capture *cap) {

Callers 6

backrefcapFunction · 0.85
tablecapFunction · 0.85
querycapFunction · 0.85
functioncapFunction · 0.85
runtimecapFunction · 0.85
pushcaptureFunction · 0.85

Calls 2

pushcaptureFunction · 0.85
lua_pushlstringFunction · 0.70

Tested by

no test coverage detected