From 4abeb5f8a6ad77b32496f3e8b20e1fd1b6f428fb Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Fri, 18 Apr 2025 07:54:40 +0000
Subject: [PATCH] function checking

---
 src/Interpreter/OperationsFactory.hpp |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/Interpreter/OperationsFactory.hpp b/src/Interpreter/OperationsFactory.hpp
index 5adbaf7..2dc39af 100644
--- a/src/Interpreter/OperationsFactory.hpp
+++ b/src/Interpreter/OperationsFactory.hpp
@@ -52,6 +52,25 @@
                                               Operations::Container::instance()->add(
                                                   ns, Operations::Operation{Operations::Type::Declaration, varName, std::move(stmt)});
                                           }
+    
+    /**
+     * @brief Record a function call operation for later detection.
+     * @param functionName Name of the function being called.
+     * @param ns Current namespace scope.
+     * @param fileName Source filename.
+     * @param line Line number of call.
+     * @param column Column number of call.
+     */
+    static void callFunction(const std::string & functionName,
+                             const std::string & ns,
+                             const std::string & fileName,
+                             int line,
+                             size_t column) {
+        // No associated StatementNode; this is for detection only
+        Operations::Container::instance()->add(
+            ns,
+            Operations::Operation{Operations::Type::FunctionCall, functionName, nullptr});
+    }
 };
 
 }  // namespace Interpreter

--
Gitblit v1.9.3