diff --git a/src/etc/lexer.cpp b/src/etc/lexer.cpp index 8d26821..25f6ab3 100644 --- a/src/etc/lexer.cpp +++ b/src/etc/lexer.cpp @@ -34,7 +34,7 @@ vector lex(const string& in) for (;i < in.size(); ++i) { const tok::type currentCharType = getIdentifierCharType(in[i]); const bool isString = currentCharType == STRING; - if (i == in.size() - 1 && not isString) throw tok::LexerException("A never ending string was found", lineNumber); + if (isTypeString && (i == in.size() - 1 && not isString)) throw tok::LexerException("A never ending string was found", lineNumber); if ((currentCharType == type || isTypeString) && !isString) { formedString += string(1, in[i]); } else { diff --git a/src/main.cpp b/src/main.cpp index afdc3e2..d5674b7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,10 +69,11 @@ int main(int argc, char* argv[]) { for (future>>& currentFuture: Units) { const auto&& result = currentFuture.get(); if (not result.second.has_value()) { - if (printResult) cout << result.first << "\n\n"; + if (printResult) cout << result.first; } else { - cout << "Compilation of " << result.first << " has failed with the following error:\n" << result.second.value().what() << "\n\n"; + cout << "Compilation of " << result.first << " has failed with the following error:\n" << result.second.value().what(); } + cout << "\n\n"; } } else cout << "No valid file provided.\n"; }