Skip to content

Commit 0932141

Browse files
committed
修复一个bug
1 parent dbd5811 commit 0932141

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

CodeService/src/LuaFormatter.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,14 @@ std::vector<LuaDiagnosisInfo> LuaFormatter::GetDiagnosisInfos()
7575

7676
_env->DiagnosisCodeStyle(ctx);
7777

78-
if (_options.enable_name_style_check) {
78+
if (_options.enable_name_style_check)
79+
{
7980
NameStyleChecker checker(ctx);
8081
auto chunkAst = _parser->GetAst();
8182
chunkAst->AcceptChildren(checker);
8283
checker.Analysis();
8384
}
84-
85+
8586
return ctx.GetDiagnosisInfos();
8687
}
8788

@@ -1823,6 +1824,12 @@ std::shared_ptr<FormatElement> LuaFormatter::FormatCallExpression(std::shared_pt
18231824
env->Add<KeepElement>(1);
18241825
}
18251826

1827+
break;
1828+
}
1829+
case LuaAstNodeType::CallExpression:
1830+
{
1831+
env->AddChild(FormatNode(child));
1832+
env->Add<KeepElement>(0);
18261833
break;
18271834
}
18281835
case LuaAstNodeType::CallArgList:

0 commit comments

Comments
 (0)