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

Function inclinenumber

depends/lua/src/llex.c:151–159  ·  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

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