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

Function isheadfail

other_src/lua/src/lpeg.cpp:936–942  ·  view source on GitHub ↗

** A 'headfail' pattern is a pattern that can only fails in its first ** instruction, which must be a check. */

Source from the content-addressed store, hash-verified

934** instruction, which must be a check.
935*/
936static int isheadfail (Instruction *p) {
937 if (!ischeck(p)) return 0;
938 /* check that other operations cannot fail */
939 for (p += sizei(p); p->i.code != IEnd; p += sizei(p))
940 if (!isnofail(p)) return 0;
941 return 1;
942}
943
944
945#define checkpattern(L, idx) ((Instruction *)luaL_checkudata(L, idx, PATTERN_T))

Callers 3

diff_lFunction · 0.85
basicUnionFunction · 0.85
star_lFunction · 0.85

Calls 1

sizeiFunction · 0.85

Tested by

no test coverage detected