| 481 | } |
| 482 | |
| 483 | void LuaLexer::ReadLongString(std::size_t sep) { |
| 484 | _reader.SaveAndNext(); |
| 485 | |
| 486 | if (CurrentIsNewLine()) { |
| 487 | IncLinenumber(); |
| 488 | } |
| 489 | |
| 490 | for (;;) { |
| 491 | switch (_reader.GetCurrentChar()) { |
| 492 | case EOZ: { |
| 493 | TokenError("unfinished long string starting", TextRange(_reader.GetPos(), 0)); |
| 494 | return; |
| 495 | } |
| 496 | case ']': { |
| 497 | if (SkipSep() == sep) { |
| 498 | _reader.SaveAndNext(); |
| 499 | return; |
| 500 | } |
| 501 | break; |
| 502 | } |
| 503 | case '\n': |
| 504 | case '\r': { |
| 505 | _reader.Save(); |
| 506 | IncLinenumber(); |
| 507 | break; |
| 508 | } |
| 509 | default: { |
| 510 | _reader.SaveAndNext(); |
| 511 | } |
| 512 | } |
| 513 | } |
| 514 | } |
| 515 | |
| 516 | void LuaLexer::ReadLongCLikeComment() { |
| 517 | if (CurrentIsNewLine()) { |
nothing calls this directly
no test coverage detected