aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-03-02 15:09:05 +0800
committerLi Jin <dragon-fly@qq.com>2021-03-02 15:09:05 +0800
commit990abfb9e1a464b962471f559c9ccff225f62f39 (patch)
treec4146aeb2247b017792f385770f35141c92b0369 /src
parentae4bb18baf534d475c48876f249b18b6d0b02380 (diff)
downloadyuescript-990abfb9e1a464b962471f559c9ccff225f62f39.tar.gz
yuescript-990abfb9e1a464b962471f559c9ccff225f62f39.tar.bz2
yuescript-990abfb9e1a464b962471f559c9ccff225f62f39.zip
fix issue #40.
Diffstat (limited to 'src')
-rw-r--r--src/yuescript/yue_compiler.cpp4
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
61const std::string_view version = "0.6.9"sv; 61const std::string_view version = "0.6.10"sv;
62const std::string_view extension = "yue"sv; 62const std::string_view extension = "yue"sv;
63 63
64class YueCompilerImpl { 64class 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);