MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / skip_sep

Function skip_sep

lib/lua/src/llex.c:265–277  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

263** otherwise (an unfinished '[==...') return 0.
264*/
265static size_t skip_sep (LexState *ls) {
266 size_t count = 0;
267 int s = ls->current;
268 lua_assert(s == '[' || s == ']');
269 save_and_next(ls);
270 while (ls->current == '=') {
271 save_and_next(ls);
272 count++;
273 }
274 return (ls->current == s) ? count + 2
275 : (count == 0) ? 1
276 : 0;
277}
278
279
280static 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