diff --git a/src/Interpreter.cpp b/src/Interpreter.cpp index e12ae91..806303e 100644 --- a/src/Interpreter.cpp +++ b/src/Interpreter.cpp @@ -341,9 +341,14 @@ optional Interpreter::interpret(vector tokenList, bool isFunction) } // Execute the instruction log.debug("Length of line is " + to_string(lengthOfLine)); + if (isFunction) { + optional returnTokenOptional = executeCode(currentInstruction, true); + if (returnTokenOptional.has_value()); + } executeCode(currentInstruction, isFunction); lengthOfLine = 0; } + return {}; } optional Interpreter::executeCode(vector tokens, bool isFunction) {