| 70 | |
| 71 | |
| 72 | void 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 | |
| 84 | const char *luaX_token2str(LexState *ls, int token) { |