File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
Test/test_script/format_text Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ option(EnableTest "Test project" ON)
1111
1212if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
1313 add_definitions (-DMSVC)
14- # ÓÅ»¯Ñ¡Ïî
1514else ()
1615 set (CMAKE_C_FLAGS_RELEASE "-O2" )
1716 set (CMAKE_CXX_FLAGS_RELEASE "-O2" )
Original file line number Diff line number Diff line change @@ -1791,7 +1791,7 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatNodeAndBlockOrEnd(LuaAstNode:
17911791 else
17921792 {
17931793 singleLineBlock = true ;
1794- env->Add <KeepBlankElement >(1 );
1794+ env->Add <KeepElement >(1 );
17951795
17961796 for (auto blockChild : block->GetChildren ())
17971797 {
@@ -1800,7 +1800,7 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatNodeAndBlockOrEnd(LuaAstNode:
18001800 auto shortExpression = std::make_shared<ExpressionElement>();
18011801 shortExpression->AddChildren (blockChild->GetChildren ());
18021802 env->AddChild (shortExpression);
1803- env->Add <KeepBlankElement >(1 );
1803+ env->Add <KeepElement >(1 );
18041804 }
18051805 }
18061806 }
Original file line number Diff line number Diff line change 1818end
1919
2020
21+ if a then return a -- end
22+
23+
24+ end
25+
2126
2227
2328
Original file line number Diff line number Diff line change @@ -16,3 +16,9 @@ elseif aa then
1616elseif ccc then
1717else
1818end
19+
20+
21+ if a then return a -- end
22+
23+
24+ end
You can’t perform that action at this time.
0 commit comments