From c74f45ba9778792e6f5a239539d25fd7918252f7 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Thu, 6 Aug 2020 00:32:43 +0800 Subject: clean up. --- src/MoonP/moon_compiler.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') 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: } _buf << indent(1) << "__base = "sv << baseVar; if (!className.empty()) { - _buf << ","sv << nll(classDecl) << indent(1) << "__name = "sv << className << (extend ? s(","sv) : Empty) << nll(classDecl); - } else { - _buf << (extend ? s(","sv) : Empty) << nll(classDecl); + _buf << ","sv << nll(classDecl); + _buf << indent(1) << "__name = "sv << className; } if (extend) { - _buf << indent(1) << "__parent = "sv << parentVar << nll(classDecl); + _buf << ","sv << nll(classDecl); + _buf << indent(1) << "__parent = "sv << parentVar; } + _buf << nll(classDecl); _buf << indent() << "}, {"sv << nll(classDecl); if (extend) { _buf << indent(1) << "__index = function(cls, name)"sv << nll(classDecl); -- cgit v1.2.3-55-g6feb