From 46a1031a0884164185790c7f2101c3c04fdba5d5 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Tue, 23 Dec 2025 12:18:22 +0300 Subject: [PATCH] Move return_statement to function.hpp --- libs/ast/include/pslang/ast/function.hpp | 8 ++++++++ libs/ast/include/pslang/ast/statement.hpp | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) 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,