From d7cd4947b37a168034e9fca2501d98553fdcc137 Mon Sep 17 00:00:00 2001
From: Ferenc Szontágh <szf@fsociety.hu>
Date: Mon, 14 Apr 2025 19:49:49 +0000
Subject: [PATCH] refactor phase1
---
src/ScriptInterpreterHelpers.hpp | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/ScriptInterpreterHelpers.hpp b/src/ScriptInterpreterHelpers.hpp
index bff499f..a8567fc 100644
--- a/src/ScriptInterpreterHelpers.hpp
+++ b/src/ScriptInterpreterHelpers.hpp
@@ -1,8 +1,7 @@
#ifndef SCRIPTINTERPRETERHELPERS_HPP
#define SCRIPTINTERPRETERHELPERS_HPP
-#include <iostream>
-#include <ostream>
+#include <algorithm>
#include <vector>
#include "ScriptExceptionMacros.h"
@@ -14,12 +13,7 @@
namespace ScriptInterpreterHelpers {
-static std::string extractSubstring(const std::string & str, const size_t & start, const size_t & end) {
- if (start >= 0 && start < str.length() && end >= start && end < str.length()) {
- return str.substr(start, end - start + 1);
- }
- return "";
-}
+
static void expectSemicolon(const std::vector<Token> & tokens, std::size_t & i, const std::string & message,
const std::string & file = __FILE__, int line = __LINE__) {
@@ -98,6 +92,7 @@
}
};
+
}; // namespace ScriptInterpreterHelpers
#endif // SCRIPTINTERPRETERHELPERS_HPP
--
Gitblit v1.9.3