Иправил баг с выполнением include

This commit is contained in:
SkrinVex
2025-12-28 00:59:33 +05:00
parent 16ebb96a2d
commit d1b4f5a6b5
4 changed files with 40 additions and 22 deletions
+1 -2
View File
@@ -87,8 +87,7 @@ std::vector<Token> Lexer::tokenize() {
case '<': tokens.push_back({TokenType::LT, "<", line}); break;
case '>': tokens.push_back({TokenType::GT, ">", line}); break;
default:
std::cerr << "Lexer Error: Unknown char '" << current << "' at line " << line << std::endl;
exit(1);
throw std::runtime_error(std::string("Runtime Error: Unknown character '") + current + "' at line " + std::to_string(line));
}
pos++;
}