Remove 'annotation' feature

This commit is contained in:
Jason Turner
2016-04-16 07:52:39 -06:00
parent 498339c202
commit 32bd936a18
11 changed files with 23 additions and 101 deletions

View File

@@ -204,8 +204,6 @@ namespace chaiscript
return m_arity;
}
virtual std::string annotation() const = 0;
static bool compare_type_to_param(const Type_Info &ti, const Boxed_Value &bv, const Type_Conversions_State &t_conversions)
{
if (ti.is_undef()
@@ -306,11 +304,10 @@ namespace chaiscript
int t_arity=-1,
AST_NodePtr t_parsenode = AST_NodePtr(),
Param_Types t_param_types = Param_Types(),
std::string t_description = "",
Proxy_Function t_guard = Proxy_Function())
: Proxy_Function_Base(build_param_type_list(t_param_types), t_arity),
m_param_types(std::move(t_param_types)),
m_guard(std::move(t_guard)), m_parsenode(std::move(t_parsenode)), m_description(std::move(t_description))
m_guard(std::move(t_guard)), m_parsenode(std::move(t_parsenode))
{
}
@@ -343,11 +340,6 @@ namespace chaiscript
return m_parsenode;
}
virtual std::string annotation() const override
{
return m_description;
}
protected:
bool test_guard(const std::vector<Boxed_Value> &params, const Type_Conversions_State &t_conversions) const
@@ -387,7 +379,6 @@ namespace chaiscript
Param_Types m_param_types;
Proxy_Function m_guard;
AST_NodePtr m_parsenode;
std::string m_description;
};
@@ -401,13 +392,11 @@ namespace chaiscript
int t_arity=-1,
AST_NodePtr t_parsenode = AST_NodePtr(),
Param_Types t_param_types = Param_Types(),
std::string t_description = "",
Proxy_Function t_guard = Proxy_Function())
: Dynamic_Proxy_Function(
t_arity,
std::move(t_parsenode),
std::move(t_param_types),
std::move(t_description),
std::move(t_guard)
),
m_f(std::move(t_f))
@@ -506,10 +495,6 @@ namespace chaiscript
return args;
}
virtual std::string annotation() const override
{
return "Bound: " + m_f->annotation();
}
protected:
static std::vector<Type_Info> build_param_type_info(const Const_Proxy_Function &t_f,
@@ -554,11 +539,6 @@ namespace chaiscript
{
}
std::string annotation() const override
{
return "";
}
bool call_match(const std::vector<Boxed_Value> &vals, const Type_Conversions_State &t_conversions) const override
{
return static_cast<int>(vals.size()) == get_arity()
@@ -692,11 +672,6 @@ namespace chaiscript
return vals[0].get_type_info().bare_equal(user_type<Class>());
}
std::string annotation() const override
{
return "";
}
protected:
Boxed_Value do_call(const std::vector<Boxed_Value> &params, const Type_Conversions_State &t_conversions) const override
{