#pragma once #include #include #include namespace Tokenizer { // Splits a command line on whitespace. Double quotes group words into a single // token ("Breeze A"). Throws std::invalid_argument on an unterminated quote. std::vector split(const std::string& line); // Lenient split for tab completion: completed words, plus the word being typed. struct PartialLine { std::vector words; // completed words (quotes removed) std::string current; // word being typed (quotes removed, may be empty) std::size_t start = 0; // index in the text where that word begins }; PartialLine splitPartial(const std::string& text); } // namespace Tokenizer