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

Function repeatheadfail

other_src/lua/src/lpeg.cpp:1603–1615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1601
1602
1603static Instruction *repeatheadfail (lua_State *L, int l1, int n) {
1604 /* e; ...; e; L2: e'(L1); jump L2; L1: ... */
1605 int i;
1606 Instruction *p = newpatt(L, (n + 1)*l1 + 1);
1607 Instruction *op = p;
1608 for (i = 0; i < n; i++) {
1609 p += addpatt(L, p, 1);
1610 }
1611 p += addpatt(L, p, 1);
1612 check2test(p - l1, l1 + 1);
1613 setinst(p, IJmp, -l1);
1614 return op;
1615}
1616
1617
1618static Instruction *repeats (lua_State *L, Instruction *p1, int l1, int n) {

Callers 1

star_lFunction · 0.85

Calls 3

newpattFunction · 0.85
addpattFunction · 0.85
check2testFunction · 0.85

Tested by

no test coverage detected