MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaX_init

Function luaX_init

src/Chain/libraries/glua/llex.cpp:72–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70
71
72void luaX_init(lua_State *L) {
73 int i;
74 TString *e = luaS_newliteral(L, LUA_ENV); /* create env name */
75 luaC_fix(L, obj2gco(e)); /* never collect this name */
76 for (i = 0; i < NUM_RESERVED; i++) {
77 TString *ts = luaS_new(L, luaX_tokens[i]);
78 luaC_fix(L, obj2gco(ts)); /* reserved words are never collected */
79 ts->extra = cast_byte(i + 1); /* reserved word */
80 }
81}
82
83
84const char *luaX_token2str(LexState *ls, int token) {

Callers 1

f_luaopenFunction · 0.85

Calls 2

luaC_fixFunction · 0.85
luaS_newFunction · 0.85

Tested by

no test coverage detected