** 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. */
| 263 | ** otherwise (an unfinished '[==...') return 0. |
| 264 | */ |
| 265 | static 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 | |
| 280 | static void read_long_string (LexState *ls, SemInfo *seminfo, size_t sep) { |
no outgoing calls
no test coverage detected