22 lines
480 B
C++
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(){}
|
|
};
|
|
|
|
} |