** 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. */
| 464 | ** otherwise (an unfinished '[==...') return 0. |
| 465 | */ |
| 466 | std::size_t LuaLexer::SkipSep() { |
| 467 | std::size_t count = 0; |
| 468 | int ch = _reader.GetCurrentChar(); |
| 469 | |
| 470 | _reader.SaveAndNext(); |
| 471 | |
| 472 | while (_reader.GetCurrentChar() == '=') { |
| 473 | _reader.SaveAndNext(); |
| 474 | count++; |
| 475 | } |
| 476 | |
| 477 | return _reader.GetCurrentChar() == ch |
| 478 | ? count + 2 |
| 479 | : (count == 0) ? 1 |
| 480 | : 0; |
| 481 | } |
| 482 | |
| 483 | void LuaLexer::ReadLongString(std::size_t sep) { |
| 484 | _reader.SaveAndNext(); |
nothing calls this directly
no test coverage detected