MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getlocalattribute

Function getlocalattribute

extlibs/lua/src/lparser.c:1720–1734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1718
1719
1720static int getlocalattribute (LexState *ls) {
1721 /* ATTRIB -> ['<' Name '>'] */
1722 if (testnext(ls, '<')) {
1723 const char *attr = getstr(str_checkname(ls));
1724 checknext(ls, '>');
1725 if (strcmp(attr, "const") == 0)
1726 return RDKCONST; /* read-only variable */
1727 else if (strcmp(attr, "close") == 0)
1728 return RDKTOCLOSE; /* to-be-closed variable */
1729 else
1730 luaK_semerror(ls,
1731 luaO_pushfstring(ls->L, "unknown attribute '%s'", attr));
1732 }
1733 return VDKREG;
1734}
1735
1736
1737static void checktoclose (LexState *ls, int level) {

Callers 1

localstatFunction · 0.85

Calls 5

testnextFunction · 0.85
str_checknameFunction · 0.85
checknextFunction · 0.85
luaK_semerrorFunction · 0.85
luaO_pushfstringFunction · 0.85

Tested by

no test coverage detected