From 7a3e7151ea7e05952ec58648d71d9ed33168109d Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Thu, 22 Aug 2024 22:45:34 +0530 Subject: Add tacky generation for declarations, statements --- src/cljcc/analyzer.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cljcc/analyzer.clj') diff --git a/src/cljcc/analyzer.clj b/src/cljcc/analyzer.clj index 5eb03ee..504e8ab 100644 --- a/src/cljcc/analyzer.clj +++ b/src/cljcc/analyzer.clj @@ -68,7 +68,7 @@ {:body [] :variable-map {}} (:body f))] - (assoc f :body updated-body))) + (assoc f :body (:body updated-body)))) (defn validate [ast] (map validate-function ast)) @@ -90,7 +90,7 @@ return 0; }")) (pp/pprint - (p/parse-from-src + (validate-from-src "int main (void) { int x; int a = -1; -- cgit v1.2.3