Move return_statement to function.hpp

This commit is contained in:
Nikita Lisitsa 2025-12-23 12:18:22 +03:00
parent a36ba2610b
commit 46a1031a08
2 changed files with 8 additions and 8 deletions

View file

@ -28,6 +28,14 @@ namespace pslang::ast
ast::location location; ast::location location;
}; };
struct return_statement
{
// can be null, which means "return unit"
expression_ptr value;
ast::location location;
std::size_t level = 0;
};
struct function_call struct function_call
{ {
expression_ptr function; expression_ptr function;

View file

@ -30,14 +30,6 @@ namespace pslang::ast
ast::location location; ast::location location;
}; };
struct return_statement
{
// can be null, which means "return unit"
expression_ptr value;
ast::location location;
std::size_t level = 0;
};
using statement_impl = std::variant< using statement_impl = std::variant<
expression_ptr, expression_ptr,
assignment, assignment,