#pragma once #include "token.hh" #include #include struct Scanner { Scanner(const std::string &code) : code{code}, tokens{}, start{0}, current{0}, line{1} {}; std::vector scan_tokens(); bool is_at_end(); void scan_token(); char advance(); void add_token(TokenType type); void add_token(TokenType type, Object literal); std::string code; std::vector tokens; std::size_t start, current, line; };