A simple scripting language in C++
Ferenc Szontágh
2025-04-14 d7cd4947b37a168034e9fca2501d98553fdcc137
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