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

Function optionals

other_src/lua/src/lpeg.cpp:1646–1658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1644
1645
1646static void optionals (lua_State *L, int l1, int n) {
1647 /* choice L1; e; partialcommit L2; L2: ... e; L1: commit L3; L3: ... */
1648 int i;
1649 Instruction *op = newpatt(L, n*(l1 + 1) + 1);
1650 Instruction *p = op;
1651 setinst(p++, IChoice, 1 + n*(l1 + 1));
1652 for (i = 0; i < n; i++) {
1653 p += addpatt(L, p, 1);
1654 setinst(p++, IPartialCommit, 1);
1655 }
1656 setinst(p - 1, ICommit, 1); /* correct last commit */
1657 optimizechoice(op);
1658}
1659
1660
1661static int star_l (lua_State *L) {

Callers 1

star_lFunction · 0.85

Calls 3

newpattFunction · 0.85
addpattFunction · 0.85
optimizechoiceFunction · 0.85

Tested by

no test coverage detected