fix compiler animtree bug

This commit is contained in:
xensik 2022-10-04 22:35:56 +02:00
parent caef54f50d
commit 5093173549
13 changed files with 25 additions and 30 deletions

View File

@ -1996,7 +1996,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2016,7 +2016,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -1996,7 +1996,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2016,7 +2016,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2004,7 +2004,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2024,7 +2024,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2001,7 +2001,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2021,7 +2021,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2001,7 +2001,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2021,7 +2021,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -1993,7 +1993,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2013,7 +2013,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -1993,7 +1993,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2013,7 +2013,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -1993,7 +1993,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2013,7 +2013,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2052,7 +2052,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2072,7 +2072,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2001,7 +2001,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2021,7 +2021,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2001,7 +2001,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2021,7 +2021,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -2052,7 +2052,7 @@ void compiler::emit_expr_animation(const ast::expr_animation::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimation, { "''", expr->value });
emit_opcode(opcode::OP_GetAnimation, { "", expr->value });
}
else
{
@ -2072,7 +2072,7 @@ void compiler::emit_expr_animtree(const ast::expr_animtree::ptr& expr)
if (tree.loaded)
{
emit_opcode(opcode::OP_GetAnimTree, "''");
emit_opcode(opcode::OP_GetAnimTree, "");
}
else
{

View File

@ -1297,12 +1297,7 @@ auto program::print() const -> std::string
for (const auto& entry : declarations)
{
if (entry == kind::decl_thread)
{
data += "\n";
}
data += entry.print();
data += "\n" + entry.print();
}
return data;