enhance developer mode
This commit is contained in:
@ -407,6 +407,12 @@ decl_constant::decl_constant(const location& loc, expr_identifier::ptr name, exp
|
||||
decl_usingtree::decl_usingtree(expr_string::ptr name) : node(kind::decl_usingtree), name(std::move(name)) {}
|
||||
decl_usingtree::decl_usingtree(const location& loc, expr_string::ptr name) : node(kind::decl_usingtree, loc), name(std::move(name)) {}
|
||||
|
||||
decl_dev_begin::decl_dev_begin() : node(kind::decl_dev_begin) {}
|
||||
decl_dev_begin::decl_dev_begin(const location& loc) : node(kind::decl_dev_begin, loc) {}
|
||||
|
||||
decl_dev_end::decl_dev_end() : node(kind::decl_dev_end) {}
|
||||
decl_dev_end::decl_dev_end(const location& loc) : node(kind::decl_dev_end, loc) {}
|
||||
|
||||
include::include(expr_path::ptr path) : node(kind::include), path(std::move(path)) {}
|
||||
include::include(const location& loc, expr_path::ptr path) : node(kind::include, loc), path(std::move(path)) {}
|
||||
|
||||
@ -1178,6 +1184,16 @@ auto decl_usingtree::print() const -> std::string
|
||||
return "#using_animtree"s + "(" + name->print() + ");\n";
|
||||
}
|
||||
|
||||
auto decl_dev_begin::print() const -> std::string
|
||||
{
|
||||
return "/#";
|
||||
}
|
||||
|
||||
auto decl_dev_end::print() const -> std::string
|
||||
{
|
||||
return "#/";
|
||||
}
|
||||
|
||||
auto include::print() const -> std::string
|
||||
{
|
||||
return "#include"s + " " + path->print() + ";\n";
|
||||
@ -1705,6 +1721,8 @@ decl::~decl()
|
||||
switch (as_node->kind())
|
||||
{
|
||||
case kind::null: as_node.~unique_ptr(); return;
|
||||
case kind::decl_dev_begin: as_dev_begin.~unique_ptr(); return;
|
||||
case kind::decl_dev_end: as_dev_end.~unique_ptr(); return;
|
||||
case kind::decl_thread: as_thread.~unique_ptr(); return;
|
||||
case kind::decl_constant: as_constant.~unique_ptr(); return;
|
||||
case kind::decl_usingtree: as_usingtree.~unique_ptr(); return;
|
||||
|
@ -107,6 +107,8 @@ enum class kind
|
||||
decl_thread,
|
||||
decl_constant,
|
||||
decl_usingtree,
|
||||
decl_dev_begin,
|
||||
decl_dev_end,
|
||||
include,
|
||||
program,
|
||||
// DECOMPILER
|
||||
@ -225,6 +227,8 @@ struct stmt_prof_end;
|
||||
struct decl_thread;
|
||||
struct decl_constant;
|
||||
struct decl_usingtree;
|
||||
struct decl_dev_begin;
|
||||
struct decl_dev_end;
|
||||
struct include;
|
||||
struct program;
|
||||
struct asm_loc;
|
||||
@ -407,6 +411,8 @@ union stmt
|
||||
union decl
|
||||
{
|
||||
std::unique_ptr<node> as_node;
|
||||
std::unique_ptr<decl_dev_begin> as_dev_begin;
|
||||
std::unique_ptr<decl_dev_end> as_dev_end;
|
||||
std::unique_ptr<decl_usingtree> as_usingtree;
|
||||
std::unique_ptr<decl_constant> as_constant;
|
||||
std::unique_ptr<decl_thread> as_thread;
|
||||
@ -1541,6 +1547,24 @@ struct decl_usingtree : public node
|
||||
auto print() const -> std::string override;
|
||||
};
|
||||
|
||||
struct decl_dev_begin : public node
|
||||
{
|
||||
using ptr = std::unique_ptr<decl_dev_begin>;
|
||||
|
||||
decl_dev_begin();
|
||||
decl_dev_begin(const location& loc);
|
||||
auto print() const -> std::string override;
|
||||
};
|
||||
|
||||
struct decl_dev_end : public node
|
||||
{
|
||||
using ptr = std::unique_ptr<decl_dev_end>;
|
||||
|
||||
decl_dev_end();
|
||||
decl_dev_end(const location& loc);
|
||||
auto print() const -> std::string override;
|
||||
};
|
||||
|
||||
struct include : public node
|
||||
{
|
||||
using ptr = std::unique_ptr<include>;
|
||||
|
Reference in New Issue
Block a user