Files
fsh-oop/include/cmd/args/arg_base.hpp
2024-12-06 19:17:37 +01:00

22 lines
480 B
C++

#pragma once
#include <memory>
#include "ast/ast_component.hpp"
namespace fsh{
class _Argument {
public:
virtual void svalue(const std::string& can, const Lexer::TokenType& type = Lexer::TokenType::FLAG) {}
virtual void svalue(std::shared_ptr<CommandArgumentNode> can) {
svalue(can->gvalue(), can->gtoken_type());
}
template<typename T>
static std::shared_ptr<_Argument> create() {return std::make_shared<T>();}
protected:
_Argument(){}
};
}