diff options
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/yuescript/yue_ast.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5908f..402e5c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | project(yue CXX) | ||
| 2 | cmake_minimum_required(VERSION 3.1) | 1 | cmake_minimum_required(VERSION 3.1) |
| 2 | project(yue CXX) | ||
| 3 | 3 | ||
| 4 | set(LUA_LIBDIR ${LUA_INCDIR}/../lib ${LUA_INCDIR}/../../lib) | 4 | set(LUA_LIBDIR ${LUA_INCDIR}/../lib ${LUA_INCDIR}/../../lib) |
| 5 | set(LUA_INCLUDE_DIR "${LUA_INCDIR}") | 5 | set(LUA_INCLUDE_DIR "${LUA_INCDIR}") |
diff --git a/src/yuescript/yue_ast.cpp b/src/yuescript/yue_ast.cpp index d9f8419..f243d24 100644 --- a/src/yuescript/yue_ast.cpp +++ b/src/yuescript/yue_ast.cpp | |||
| @@ -116,7 +116,11 @@ std::string UpdateOp_t::to_string(void* ud) const { | |||
| 116 | } | 116 | } |
| 117 | std::string BinaryOperator_t::to_string(void* ud) const { | 117 | std::string BinaryOperator_t::to_string(void* ud) const { |
| 118 | auto info = reinterpret_cast<YueFormat*>(ud); | 118 | auto info = reinterpret_cast<YueFormat*>(ud); |
| 119 | return info->convert(this); | 119 | auto op = info->convert(this); |
| 120 | if (op == "!="sv) { | ||
| 121 | return "~="s; | ||
| 122 | } | ||
| 123 | return op; | ||
| 120 | } | 124 | } |
| 121 | std::string UnaryOperator_t::to_string(void* ud) const { | 125 | std::string UnaryOperator_t::to_string(void* ud) const { |
| 122 | auto info = reinterpret_cast<YueFormat*>(ud); | 126 | auto info = reinterpret_cast<YueFormat*>(ud); |
| @@ -1041,7 +1045,7 @@ std::string FnArgsDef_t::to_string(void* ud) const { | |||
| 1041 | if (shadowOption) { | 1045 | if (shadowOption) { |
| 1042 | line += (line.empty() ? ""s : " "s) + shadowOption->to_string(ud); | 1046 | line += (line.empty() ? ""s : " "s) + shadowOption->to_string(ud); |
| 1043 | } | 1047 | } |
| 1044 | return '(' + line + ')'; | 1048 | return line.empty() ? ""s : '(' + line + ')'; |
| 1045 | } | 1049 | } |
| 1046 | std::string FunLit_t::to_string(void* ud) const { | 1050 | std::string FunLit_t::to_string(void* ud) const { |
| 1047 | auto info = reinterpret_cast<YueFormat*>(ud); | 1051 | auto info = reinterpret_cast<YueFormat*>(ud); |
