Skip to content

Commit e706fb3

Browse files
committed
revert: improv: remove tabs (#181)
This reverts commit a3f3c1f.
1 parent 9695f75 commit e706fb3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/include/pl/pattern_language.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace pl {
9393
* @param checkResult Whether to check the result of the execution
9494
* @return True if the execution was successful, false otherwise. Call PatternLanguage#getCompileErrors() AND PatternLanguage#getEvalError() to get the compilation or runtime errors if false is returned
9595
*/
96-
[[nodiscard]] bool executeString(const std::string& code, const std::string& source = api::Source::DefaultSource, const std::map<std::string, core::Token::Literal> &envVars = {}, const std::map<std::string, core::Token::Literal> &inVariables = {}, bool checkResult = true);
96+
[[nodiscard]] bool executeString(std::string code, const std::string& source = api::Source::DefaultSource, const std::map<std::string, core::Token::Literal> &envVars = {}, const std::map<std::string, core::Token::Literal> &inVariables = {}, bool checkResult = true);
9797

9898
/**
9999
* @brief Executes a pattern language file

lib/source/pl/pattern_language.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,15 @@ namespace pl {
187187
return m_currAST;
188188
}
189189

190-
bool PatternLanguage::executeString(const std::string& code, const std::string& source, const std::map<std::string, core::Token::Literal> &envVars, const std::map<std::string, core::Token::Literal> &inVariables, bool checkResult) {
190+
bool PatternLanguage::executeString(std::string code, const std::string& source, const std::map<std::string, core::Token::Literal> &envVars, const std::map<std::string, core::Token::Literal> &inVariables, bool checkResult) {
191191
const auto startTime = std::chrono::high_resolution_clock::now();
192192
ON_SCOPE_EXIT {
193193
const auto endTime = std::chrono::high_resolution_clock::now();
194194
this->m_runningTime = std::chrono::duration_cast<std::chrono::duration<double>>(endTime - startTime).count();
195195
};
196196

197+
code = wolv::util::preprocessText(code);
198+
197199
const auto &evaluator = this->m_internals.evaluator;
198200

199201
evaluator->getConsole().setLogCallback(this->m_logCallback);

0 commit comments

Comments
 (0)