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

Function getvarattribute

third-party/lua-5.5.0/src/lparser.c:1793–1807  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1791
1792
1793static lu_byte getvarattribute (LexState *ls, lu_byte df) {
1794 /* attrib -> ['<' NAME '>'] */
1795 if (testnext(ls, '<')) {
1796 TString *ts = str_checkname(ls);
1797 const char *attr = getstr(ts);
1798 checknext(ls, '>');
1799 if (strcmp(attr, "const") == 0)
1800 return RDKCONST; /* read-only variable */
1801 else if (strcmp(attr, "close") == 0)
1802 return RDKTOCLOSE; /* to-be-closed variable */
1803 else
1804 luaK_semerror(ls, "unknown attribute '%s'", attr);
1805 }
1806 return df; /* return default value */
1807}
1808
1809
1810static void checktoclose (FuncState *fs, int level) {

Callers 2

localstatFunction · 0.85
getglobalattributeFunction · 0.85

Calls 4

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

Tested by

no test coverage detected