/////////////////////////////////////////////////////////////////////////// Lexer::Type::path ( / )+
| 739 | // Lexer::Type::path |
| 740 | // ( / <non-slash, non-whitespace> )+ |
| 741 | bool Lexer::isPath(std::string& token, Lexer::Type& type) { |
| 742 | std::size_t marker = _cursor; |
| 743 | int slashCount = 0; |
| 744 | |
| 745 | while (true) { |
| 746 | if (_text[marker] == '/') { |
| 747 | ++marker; |
| 748 | ++slashCount; |
| 749 | } else |
| 750 | break; |
| 751 | |
| 752 | if (_text[marker] && !unicodeWhitespace(_text[marker]) && _text[marker] != '/') { |
| 753 | utf8_next_char(_text, marker); |
| 754 | while (_text[marker] && !unicodeWhitespace(_text[marker]) && _text[marker] != '/') |
| 755 | utf8_next_char(_text, marker); |
| 756 | } else |
| 757 | break; |
| 758 | } |
| 759 | |
| 760 | if (marker > _cursor && slashCount > 3) { |
| 761 | type = Lexer::Type::path; |
| 762 | token = _text.substr(_cursor, marker - _cursor); |
| 763 | _cursor = marker; |
| 764 | return true; |
| 765 | } |
| 766 | |
| 767 | return false; |
| 768 | } |
| 769 | |
| 770 | //////////////////////////////////////////////////////////////////////////////// |
| 771 | // Lexer::Type::substitution |
nothing calls this directly
no outgoing calls
no test coverage detected