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

Function union_l

other_src/lua/src/lpeg.cpp:1572–1587  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1570
1571
1572static int union_l (lua_State *L) {
1573 int l1, l2;
1574 int size = 0;
1575 Instruction *p1 = getpatt(L, 1, &l1);
1576 Instruction *p2 = getpatt(L, 2, &l2);
1577 CharsetTag st2;
1578 if (isfail(p1)) /* check for simple identities */
1579 lua_pushvalue(L, 2); /* fail / a == a */
1580 else if (isfail(p2) || issucc(p1))
1581 lua_pushvalue(L, 1); /* a / fail == a; true / a == true */
1582 else {
1583 tocharset(p2, &st2);
1584 separateparts(L, p1, l1, l2, &size, &st2);
1585 }
1586 return 1;
1587}
1588
1589
1590static int repeatcharset (lua_State *L, Charset cs, int l1, int n) {

Callers

nothing calls this directly

Calls 4

getpattFunction · 0.85
tocharsetFunction · 0.85
separatepartsFunction · 0.85
lua_pushvalueFunction · 0.70

Tested by

no test coverage detected