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

Function skip_sep

extlibs/lua/src/llex.c:262–274  ·  view source on GitHub ↗

** reads a sequence '[=*[' or ']=*]', leaving the last bracket. ** If sequence is well formed, return its number of '='s + 2; otherwise, ** return 1 if there is no '='s or 0 otherwise (an unfinished '[==...'). */

Source from the content-addressed store, hash-verified

260** return 1 if there is no '='s or 0 otherwise (an unfinished '[==...').
261*/
262static size_t skip_sep (LexState *ls) {
263 size_t count = 0;
264 int s = ls->current;
265 lua_assert(s == '[' || s == ']');
266 save_and_next(ls);
267 while (ls->current == '=') {
268 save_and_next(ls);
269 count++;
270 }
271 return (ls->current == s) ? count + 2
272 : (count == 0) ? 1
273 : 0;
274}
275
276
277static void read_long_string (LexState *ls, SemInfo *seminfo, size_t sep) {

Callers 2

read_long_stringFunction · 0.85
llexFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected