diff options
| author | Li Jin <dragon-fly@qq.com> | 2022-07-05 11:25:59 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2022-07-05 11:25:59 +0800 |
| commit | 3106afc2473ce12787e1fcae2e2c3a101214045d (patch) | |
| tree | d85296ea11e389fcd989ed5a4d3a71add73dde02 /src/yue.cpp | |
| parent | ce9338c540ac3397f3d15c442033a618d12c5105 (diff) | |
| download | yuescript-3106afc2473ce12787e1fcae2e2c3a101214045d.tar.gz yuescript-3106afc2473ce12787e1fcae2e2c3a101214045d.tar.bz2 yuescript-3106afc2473ce12787e1fcae2e2c3a101214045d.zip | |
disable exporting macro from a normal module.
Diffstat (limited to '')
| -rw-r--r-- | src/yue.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/yue.cpp b/src/yue.cpp index 04b7099..96649c4 100644 --- a/src/yue.cpp +++ b/src/yue.cpp | |||
| @@ -498,6 +498,9 @@ int main(int narg, const char** args) { | |||
| 498 | if (!targetPath.empty()) { | 498 | if (!targetPath.empty()) { |
| 499 | fs::create_directories(targetFile.parent_path()); | 499 | fs::create_directories(targetFile.parent_path()); |
| 500 | } | 500 | } |
| 501 | if (result.codes.empty()) { | ||
| 502 | return std::tuple{0, targetFile.string(), std::string("Built "sv) + file.first + '\n'}; | ||
| 503 | } | ||
| 501 | std::ofstream output(targetFile, std::ios::trunc | std::ios::out); | 504 | std::ofstream output(targetFile, std::ios::trunc | std::ios::out); |
| 502 | if (output) { | 505 | if (output) { |
| 503 | const auto& codes = result.codes; | 506 | const auto& codes = result.codes; |
