#pragma once #include #include "ast/ast_base.hpp" #include "util/text.hpp" namespace fsh { template class TokenNode : public AstNode { public: using shared = std::shared_ptr; Lexer::TokenType gtoken_type() { return T; } std::string& gvalue() { return value; }; static std::shared_ptr build(std::list::iterator& it); protected: TokenNode(std::string value) : AstNode(NodeType::TOKEN, util::tokens[T]), value(value) {} private: std::string value; }; }