aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2020-08-06 00:32:43 +0800
committerLi Jin <dragon-fly@qq.com>2020-08-06 00:32:43 +0800
commitc74f45ba9778792e6f5a239539d25fd7918252f7 (patch)
treebf404cd16e4503d57288b385ee9ec349b263b4ef /src
parentab59ed159a87f724c8ae4d2005868337da619662 (diff)
downloadyuescript-c74f45ba9778792e6f5a239539d25fd7918252f7.tar.gz
yuescript-c74f45ba9778792e6f5a239539d25fd7918252f7.tar.bz2
yuescript-c74f45ba9778792e6f5a239539d25fd7918252f7.zip
clean up.
Diffstat (limited to 'src')
-rw-r--r--src/MoonP/moon_compiler.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/MoonP/moon_compiler.cpp b/src/MoonP/moon_compiler.cpp
index 271bc06..6ce4e48 100644
--- a/src/MoonP/moon_compiler.cpp
+++ b/src/MoonP/moon_compiler.cpp
@@ -4115,13 +4115,14 @@ private:
4115 } 4115 }
4116 _buf << indent(1) << "__base = "sv << baseVar; 4116 _buf << indent(1) << "__base = "sv << baseVar;
4117 if (!className.empty()) { 4117 if (!className.empty()) {
4118 _buf << ","sv << nll(classDecl) << indent(1) << "__name = "sv << className << (extend ? s(","sv) : Empty) << nll(classDecl); 4118 _buf << ","sv << nll(classDecl);
4119 } else { 4119 _buf << indent(1) << "__name = "sv << className;
4120 _buf << (extend ? s(","sv) : Empty) << nll(classDecl);
4121 } 4120 }
4122 if (extend) { 4121 if (extend) {
4123 _buf << indent(1) << "__parent = "sv << parentVar << nll(classDecl); 4122 _buf << ","sv << nll(classDecl);
4123 _buf << indent(1) << "__parent = "sv << parentVar;
4124 } 4124 }
4125 _buf << nll(classDecl);
4125 _buf << indent() << "}, {"sv << nll(classDecl); 4126 _buf << indent() << "}, {"sv << nll(classDecl);
4126 if (extend) { 4127 if (extend) {
4127 _buf << indent(1) << "__index = function(cls, name)"sv << nll(classDecl); 4128 _buf << indent(1) << "__index = function(cls, name)"sv << nll(classDecl);