Remove ChaiScript_Parser from stdlib, unnecessary
This commit is contained in:
parent
80cc18bf2f
commit
f9294c8cbe
@ -496,6 +496,7 @@ namespace chaiscript
|
||||
m.add(fun([](const char c) { return std::string(1, c); }), "to_string");
|
||||
m.add(fun(&Boxed_Number::to_string), "to_string");
|
||||
|
||||
|
||||
bootstrap_pod_type<double>("double", m);
|
||||
bootstrap_pod_type<long double>("long_double", m);
|
||||
bootstrap_pod_type<float>("float", m);
|
||||
@ -519,10 +520,20 @@ namespace chaiscript
|
||||
bootstrap_pod_type<std::uint32_t>("uint32_t", m);
|
||||
bootstrap_pod_type<std::uint64_t>("uint64_t", m);
|
||||
|
||||
|
||||
operators::logical_compliment<bool>(m);
|
||||
|
||||
opers_arithmetic_pod(m);
|
||||
|
||||
m.add(fun(&ChaiScript::version_major), "version_major");
|
||||
m.add(fun(&ChaiScript::version_minor), "version_minor");
|
||||
m.add(fun(&ChaiScript::version_patch), "version_patch");
|
||||
m.add(fun(&ChaiScript::version), "version");
|
||||
m.add(fun(&ChaiScript::compiler_version), "compiler_version");
|
||||
m.add(fun(&ChaiScript::compiler_name), "compiler_name");
|
||||
m.add(fun(&ChaiScript::compiler_id), "compiler_id");
|
||||
m.add(fun(&ChaiScript::debug_build), "debug_build");
|
||||
|
||||
|
||||
m.add(fun(&print), "print_string");
|
||||
m.add(fun(&println), "println_string");
|
||||
@ -600,13 +611,6 @@ namespace chaiscript
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
chaiscript::utility::add_class<parser::ChaiScript_Parser>(m,
|
||||
"ChaiScript_Parser",
|
||||
{ constructor<parser::ChaiScript_Parser ()>() },
|
||||
{ {fun(&parser::ChaiScript_Parser::parse), "parse"},
|
||||
{fun(&parser::ChaiScript_Parser::ast), "ast"} }
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ namespace chaiscript
|
||||
oss << text;
|
||||
|
||||
for (auto & elem : this->children) {
|
||||
oss << elem->pretty_print();
|
||||
oss << elem->pretty_print() << ' ';
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
@ -512,6 +512,8 @@ namespace chaiscript
|
||||
virtual ~AST_Node() = default;
|
||||
AST_Node(AST_Node &&) = default;
|
||||
AST_Node &operator=(AST_Node &&) = default;
|
||||
AST_Node(const AST_Node &) = delete;
|
||||
AST_Node& operator=(const AST_Node &) = delete;
|
||||
|
||||
|
||||
protected:
|
||||
@ -528,10 +530,6 @@ namespace chaiscript
|
||||
throw std::runtime_error("Undispatched ast_node (internal error)");
|
||||
}
|
||||
|
||||
private:
|
||||
// Copy and assignment explicitly deleted
|
||||
AST_Node(const AST_Node &) = delete;
|
||||
AST_Node& operator=(const AST_Node &) = delete;
|
||||
};
|
||||
|
||||
|
||||
|
@ -179,16 +179,9 @@ namespace chaiscript
|
||||
m_engine.add(fun([this](const std::string &t_file){ return internal_eval_file(t_file); }), "eval_file");
|
||||
m_engine.add(fun([this](const std::string &t_str){ return internal_eval(t_str); }), "eval");
|
||||
m_engine.add(fun([this](const AST_NodePtr &t_ast){ return eval(t_ast); }), "eval");
|
||||
|
||||
m_engine.add(fun(&parse), "parse");
|
||||
|
||||
m_engine.add(fun(&ChaiScript::version_major), "version_major");
|
||||
m_engine.add(fun(&ChaiScript::version_minor), "version_minor");
|
||||
m_engine.add(fun(&ChaiScript::version_patch), "version_patch");
|
||||
m_engine.add(fun(&ChaiScript::version), "version");
|
||||
m_engine.add(fun(&ChaiScript::compiler_version), "compiler_version");
|
||||
m_engine.add(fun(&ChaiScript::compiler_name), "compiler_name");
|
||||
m_engine.add(fun(&ChaiScript::compiler_id), "compiler_id");
|
||||
m_engine.add(fun(&ChaiScript::debug_build), "debug_build");
|
||||
|
||||
m_engine.add(fun([this](const Boxed_Value &t_bv, const std::string &t_name){ add_global_const(t_bv, t_name); }), "add_global_const");
|
||||
m_engine.add(fun([this](const Boxed_Value &t_bv, const std::string &t_name){ add_global(t_bv, t_name); }), "add_global");
|
||||
|
Loading…
x
Reference in New Issue
Block a user