Edit comments

This commit is contained in:
SkrinVex
2026-01-12 12:40:21 +05:00
parent d1b4f5a6b5
commit c6c1073656
2 changed files with 6 additions and 6 deletions
BIN
View File
Binary file not shown.
+6 -6
View File
@@ -10,7 +10,7 @@ int main(int argc, char* argv[]) {
return 1;
}
// 1. Читаем файл
//Читаем файл
std::ifstream file(argv[1]);
if (!file.is_open()) {
std::cerr << "Error: Could not open file " << argv[1] << std::endl;
@@ -21,16 +21,16 @@ int main(int argc, char* argv[]) {
buffer << file.rdbuf();
std::string code = buffer.str();
// 2. Запускаем конвейер
//Запускаем конвейер
Lexer lexer(code);
std::vector<Token> tokens = lexer.tokenize();
Parser parser(tokens);
// ВАЖНО: Передаем имя файла, чтобы парсер знал, где он находится
parser.currentFile = argv[1];
//Передаем имя файла, чтобы парсер знал, где он находится
parser.currentFile = argv[1];
parser.run();
return 0;
}
}