From c91e935c62b8e254b9daadf37b915c983518bff4 Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Fri, 18 Apr 2025 16:25:35 +0000
Subject: [PATCH] add dynamic module load, more escape seq
---
src/Interpreter/Interpreter.hpp | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/Interpreter/Interpreter.hpp b/src/Interpreter/Interpreter.hpp
index fe1dfb7..fe18030 100644
--- a/src/Interpreter/Interpreter.hpp
+++ b/src/Interpreter/Interpreter.hpp
@@ -12,10 +12,13 @@
class Interpreter {
private:
-
-
+ bool debug_ = false;
public:
- Interpreter() {}
+ /**
+ * @brief Construct interpreter with optional debug output
+ * @param debug enable interpreter debug output
+ */
+ Interpreter(bool debug = false) : debug_(debug) {}
/**
* @brief Execute all operations in the current namespace (e.g., file-level or function-level).
@@ -29,7 +32,9 @@
}
void runOperation(const Operations::Operation & op) {
- std::cout << "Operation: " << op.toString() << "\n";
+ if (debug_) {
+ std::cerr << "[Debug][Interpreter] Operation: " << op.toString() << "\n";
+ }
switch (op.type) {
case Operations::Type::Declaration:
--
Gitblit v1.9.3