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

Function inclinenumber

3rd/lua-5.4.3/src/llex.c:156–164  ·  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

154** \n, \r, \n\r, or \r\n)
155*/
156static void inclinenumber (LexState *ls) {
157 int old = ls->current;
158 lua_assert(currIsNewline(ls));
159 next(ls); /* skip '\n' or '\r' */
160 if (currIsNewline(ls) && ls->current != old)
161 next(ls); /* skip '\n\r' or '\r\n' */
162 if (++ls->linenumber >= MAX_INT)
163 lexerror(ls, "chunk has too many lines", 0);
164}
165
166
167void 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 2

nextFunction · 0.85
lexerrorFunction · 0.85

Tested by

no test coverage detected