** 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 '[==...'). */
| 249 | ** return 1 if there is no '='s or 0 otherwise (an unfinished '[==...'). |
| 250 | */ |
| 251 | static size_t skip_sep (LexState *ls) { |
| 252 | size_t count = 0; |
| 253 | int s = ls->current; |
| 254 | lua_assert(s == '[' || s == ']'); |
| 255 | save_and_next(ls); |
| 256 | while (ls->current == '=') { |
| 257 | save_and_next(ls); |
| 258 | count++; |
| 259 | } |
| 260 | return (ls->current == s) ? count + 2 |
| 261 | : (count == 0) ? 1 |
| 262 | : 0; |
| 263 | |
| 264 | } |
| 265 | |
| 266 | |
| 267 | static void read_long_string (LexState *ls, SemInfo *seminfo, size_t sep) { |
no outgoing calls
no test coverage detected