diff --git a/libs/ast/include/pslang/ast/function.hpp b/libs/ast/include/pslang/ast/function.hpp index 5b81544..6d2955c 100644 --- a/libs/ast/include/pslang/ast/function.hpp +++ b/libs/ast/include/pslang/ast/function.hpp @@ -28,6 +28,14 @@ namespace pslang::ast 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 { expression_ptr function; diff --git a/libs/ast/include/pslang/ast/statement.hpp b/libs/ast/include/pslang/ast/statement.hpp index 246c4f9..a4c42f8 100644 --- a/libs/ast/include/pslang/ast/statement.hpp +++ b/libs/ast/include/pslang/ast/statement.hpp @@ -30,14 +30,6 @@ namespace pslang::ast 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< expression_ptr, assignment,