diff options
| author | Li Jin <dragon-fly@qq.com> | 2021-03-02 15:09:05 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2021-03-02 15:09:05 +0800 |
| commit | 990abfb9e1a464b962471f559c9ccff225f62f39 (patch) | |
| tree | c4146aeb2247b017792f385770f35141c92b0369 /src | |
| parent | ae4bb18baf534d475c48876f249b18b6d0b02380 (diff) | |
| download | yuescript-990abfb9e1a464b962471f559c9ccff225f62f39.tar.gz yuescript-990abfb9e1a464b962471f559c9ccff225f62f39.tar.bz2 yuescript-990abfb9e1a464b962471f559c9ccff225f62f39.zip | |
fix issue #40.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index b07a998..0e65ae9 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -58,7 +58,7 @@ inline std::string s(std::string_view sv) { | |||
| 58 | return std::string(sv); | 58 | return std::string(sv); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | const std::string_view version = "0.6.9"sv; | 61 | const std::string_view version = "0.6.10"sv; |
| 62 | const std::string_view extension = "yue"sv; | 62 | const std::string_view extension = "yue"sv; |
| 63 | 63 | ||
| 64 | class YueCompilerImpl { | 64 | class YueCompilerImpl { |
| @@ -957,7 +957,7 @@ private: | |||
| 957 | } | 957 | } |
| 958 | default: YUEE("AST node mismatch", content); break; | 958 | default: YUEE("AST node mismatch", content); break; |
| 959 | } | 959 | } |
| 960 | if (statement->needSep && !out.back().empty()) { | 960 | if (statement->needSep && !out.empty() && !out.back().empty()) { |
| 961 | auto index = std::string::npos; | 961 | auto index = std::string::npos; |
| 962 | if (_config.reserveLineNumber) { | 962 | if (_config.reserveLineNumber) { |
| 963 | index = out.back().rfind(" -- "sv); | 963 | index = out.back().rfind(" -- "sv); |
