MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / inclinenumber

Function inclinenumber

extlibs/lua/src/llex.c:154–162  ·  view source on GitHub ↗

** increment line number and skips newline sequence (any of ** \n, \r, \n\r, or \r\n) */

Source from the content-addressed store, hash-verified

152** \n, \r, \n\r, or \r\n)
153*/
154static void inclinenumber (LexState *ls) {
155 int old = ls->current;
156 lua_assert(currIsNewline(ls));
157 next(ls); /* skip '\n' or '\r' */
158 if (currIsNewline(ls) && ls->current != old)
159 next(ls); /* skip '\n\r' or '\r\n' */
160 if (++ls->linenumber >= MAX_INT)
161 lexerror(ls, "chunk has too many lines", 0);
162}
163
164
165void luaX_setinput (lua_State *L, LexState *ls, ZIO *z, TString *source,

Callers 3

read_long_stringFunction · 0.85
read_stringFunction · 0.85
llexFunction · 0.85

Calls 1

lexerrorFunction · 0.85

Tested by

no test coverage detected