MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / txtToken

Function txtToken

lib/lua/src/llex.c:99–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98
99static const char *txtToken (LexState *ls, int token) {
100 switch (token) {
101 case TK_NAME: case TK_STRING:
102 case TK_FLT: case TK_INT:
103 save(ls, '\0');
104 return luaO_pushfstring(ls->L, "'%s'", luaZ_buffer(ls->buff));
105 default:
106 return luaX_token2str(ls, token);
107 }
108}
109
110
111static 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