MCPcopy Create free account
hub / github.com/DFHack/dfhack / txtToken

Function txtToken

depends/lua/src/llex.c:97–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95
96
97static const char *txtToken (LexState *ls, int token) {
98 switch (token) {
99 case TK_NAME: case TK_STRING:
100 case TK_FLT: case TK_INT:
101 save(ls, '\0');
102 return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff));
103 default:
104 return luaX_token2str(ls, token);
105 }
106}
107
108
109static l_noret lexerror (LexState *ls, const char *msg, int token) {

Callers 1

lexerrorFunction · 0.85

Calls 3

saveFunction · 0.85
luaO_pushfstringFunction · 0.85
luaX_token2strFunction · 0.85

Tested by

no test coverage detected