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

Function luaX_token2str

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

Source from the content-addressed store, hash-verified

82
83
84const char *luaX_token2str(LexState *ls, int token) {
85 if (token < FIRST_RESERVED) { /* single-byte symbols? */
86 lua_assert(token == cast_uchar(token));
87 return luaO_pushfstring(ls->L, "'%c'", token);
88 }
89 else {
90 const char *s = luaX_tokens[token - FIRST_RESERVED];
91 if (token < TK_EOS) /* fixed format (symbols and reserved words)? */
92 return luaO_pushfstring(ls->L, "'%s'", s);
93 else /* names, strings, and numerals */
94 return s;
95 }
96}
97
98
99static const char *txtToken(LexState *ls, int token) {

Callers 3

txtTokenFunction · 0.85
error_expectedFunction · 0.85
check_matchFunction · 0.85

Calls 1

luaO_pushfstringFunction · 0.85

Tested by

no test coverage detected