MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / readdecesc

Function readdecesc

3rd/lua-5.4.3/src/llex.c:369–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367
368
369static int readdecesc (LexState *ls) {
370 int i;
371 int r = 0; /* result accumulator */
372 for (i = 0; i < 3 && lisdigit(ls->current); i++) { /* read up to 3 digits */
373 r = 10*r + ls->current - '0';
374 save_and_next(ls);
375 }
376 esccheck(ls, r <= UCHAR_MAX, "decimal escape too large");
377 luaZ_buffremove(ls->buff, i); /* remove read digits from buffer */
378 return r;
379}
380
381
382static void read_string (LexState *ls, int del, SemInfo *seminfo) {

Callers 1

read_stringFunction · 0.85

Calls 1

esccheckFunction · 0.85

Tested by

no test coverage detected