MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / getlocalattribute

Function getlocalattribute

third-party/lua-5.4.6/src/lparser.c:1700–1714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1698
1699
1700static int getlocalattribute (LexState *ls) {
1701 /* ATTRIB -> ['<' Name '>'] */
1702 if (testnext(ls, '<')) {
1703 const char *attr = getstr(str_checkname(ls));
1704 checknext(ls, '>');
1705 if (strcmp(attr, "const") == 0)
1706 return RDKCONST; /* read-only variable */
1707 else if (strcmp(attr, "close") == 0)
1708 return RDKTOCLOSE; /* to-be-closed variable */
1709 else
1710 luaK_semerror(ls,
1711 luaO_pushfstring(ls->L, "unknown attribute '%s'", attr));
1712 }
1713 return VDKREG; /* regular variable */
1714}
1715
1716
1717static void checktoclose (FuncState *fs, int level) {

Callers 1

localstatFunction · 0.85

Calls 5

testnextFunction · 0.70
str_checknameFunction · 0.70
checknextFunction · 0.70
luaK_semerrorFunction · 0.70
luaO_pushfstringFunction · 0.70

Tested by

no test coverage detected