From efd7af9f96a4b2afbddefee0a7faa83275bda717 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Thu, 20 Jul 2023 23:51:56 -0400 Subject: [PATCH] Added ability for a CodeBody to append another --- project/gen.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/project/gen.hpp b/project/gen.hpp index e36bbcb..84872bc 100644 --- a/project/gen.hpp +++ b/project/gen.hpp @@ -710,6 +710,13 @@ struct CodeBody { raw()->append( other.ast ); } + void append( CodeBody body ) + { + for ( Code entry : body ) + { + append( entry ); + } + } bool has_entries() { return rcast( AST*, ast )->has_entries();