diff options
Diffstat (limited to '')
| -rw-r--r-- | src/yue.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/yue.cpp b/src/yue.cpp index b04bd92..1704b57 100644 --- a/src/yue.cpp +++ b/src/yue.cpp | |||
| @@ -429,9 +429,11 @@ int main(int narg, const char** args) { | |||
| 429 | std::string s( | 429 | std::string s( |
| 430 | (std::istreambuf_iterator<char>(input)), | 430 | (std::istreambuf_iterator<char>(input)), |
| 431 | std::istreambuf_iterator<char>()); | 431 | std::istreambuf_iterator<char>()); |
| 432 | auto conf = config; | ||
| 433 | conf.module = file.first; | ||
| 432 | if (dumpCompileTime) { | 434 | if (dumpCompileTime) { |
| 433 | auto start = std::chrono::high_resolution_clock::now(); | 435 | auto start = std::chrono::high_resolution_clock::now(); |
| 434 | auto result = yue::YueCompiler{YUE_ARGS}.compile(s, config); | 436 | auto result = yue::YueCompiler{YUE_ARGS}.compile(s, conf); |
| 435 | auto end = std::chrono::high_resolution_clock::now(); | 437 | auto end = std::chrono::high_resolution_clock::now(); |
| 436 | if (!result.codes.empty()) { | 438 | if (!result.codes.empty()) { |
| 437 | std::chrono::duration<double> diff = end - start; | 439 | std::chrono::duration<double> diff = end - start; |
| @@ -451,7 +453,7 @@ int main(int narg, const char** args) { | |||
| 451 | return std::tuple{1, file.first, buf.str()}; | 453 | return std::tuple{1, file.first, buf.str()}; |
| 452 | } | 454 | } |
| 453 | } | 455 | } |
| 454 | auto result = yue::YueCompiler{YUE_ARGS}.compile(s, config); | 456 | auto result = yue::YueCompiler{YUE_ARGS}.compile(s, conf); |
| 455 | if (result.error.empty()) { | 457 | if (result.error.empty()) { |
| 456 | if (!writeToFile) { | 458 | if (!writeToFile) { |
| 457 | return std::tuple{0, file.first, result.codes + '\n'}; | 459 | return std::tuple{0, file.first, result.codes + '\n'}; |
