#ifndef WILLOWC_INCLUDE_PARSER_HPP #define WILLOWC_INCLUDE_PARSER_HPP #include #include #include #include #include namespace willowc { class Parser { std::string_view buf; std::vector kinds; std::vector starts; Tokenizer tokenizer; std::size_t pos; public: Parser(std::string_view buf) : buf(buf), tokenizer(buf) {} std::optional> parse(); TokenKind kind() const { return kinds[pos]; } std::size_t start() const { return starts[pos]; } }; } // namespace willowc #endif // WILLOWC_INCLUDE_PARSER_HPP