diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lua/makefile | 2 | ||||
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/lua/makefile b/src/lua/makefile index 8e11fa3..ccd5315 100644 --- a/src/lua/makefile +++ b/src/lua/makefile | |||
| @@ -61,7 +61,7 @@ else | |||
| 61 | endif | 61 | endif |
| 62 | 62 | ||
| 63 | CC= gcc | 63 | CC= gcc |
| 64 | CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common -march=native | 64 | CFLAGS= -Wall -O2 $(MYCFLAGS) -fno-stack-protector -fno-common |
| 65 | AR= ar rc | 65 | AR= ar rc |
| 66 | RANLIB= ranlib | 66 | RANLIB= ranlib |
| 67 | RM= rm -f | 67 | RM= rm -f |
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index f27a810..38456cc 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -59,7 +59,7 @@ inline std::string s(std::string_view sv) { | |||
| 59 | return std::string(sv); | 59 | return std::string(sv); |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | const std::string_view version = "0.7.3"sv; | 62 | const std::string_view version = "0.7.4"sv; |
| 63 | const std::string_view extension = "yue"sv; | 63 | const std::string_view extension = "yue"sv; |
| 64 | 64 | ||
| 65 | class YueCompilerImpl { | 65 | class YueCompilerImpl { |
| @@ -2343,7 +2343,16 @@ private: | |||
| 2343 | } | 2343 | } |
| 2344 | } else if (mode != LocalMode::None) { | 2344 | } else if (mode != LocalMode::None) { |
| 2345 | ClassDecl_t* classDecl = nullptr; | 2345 | ClassDecl_t* classDecl = nullptr; |
| 2346 | if (auto assignment = assignmentFrom(stmt)) { | 2346 | ast_ptr<false, ExpListAssign_t> assignment; |
| 2347 | if (auto exportNode = stmt->content.as<Export_t>()) { | ||
| 2348 | if (exportNode->assign) { | ||
| 2349 | assignment = stmt->new_ptr<ExpListAssign_t>(); | ||
| 2350 | assignment->expList.set(exportNode->target); | ||
| 2351 | assignment->action.set(exportNode->assign); | ||
| 2352 | } | ||
| 2353 | } | ||
| 2354 | if (!assignment) assignment = assignmentFrom(stmt); | ||
| 2355 | if (assignment) { | ||
| 2347 | auto vars = getAssignVars(assignment); | 2356 | auto vars = getAssignVars(assignment); |
| 2348 | for (const auto& var : vars) { | 2357 | for (const auto& var : vars) { |
| 2349 | if (var.empty()) continue; | 2358 | if (var.empty()) continue; |
