Skip to content

Commit 7c6f0da

Browse files
committed
命令行工具将必然以\n结尾
1 parent 7f903e2 commit 7c6f0da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CodeFormat/src/CodeFormat.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,15 @@ int main(int argc, char** argv)
8080
{
8181
options = std::make_shared<LuaCodeStyleOptions>();
8282
}
83+
options->end_of_line = "\n";
8384

8485
parser->BuildAstWithComment();
8586

87+
if(parser->HasError())
88+
{
89+
return -1;
90+
}
91+
8692
LuaFormatter formatter(parser, *options);
8793
formatter.BuildFormattedElement();
8894

0 commit comments

Comments
 (0)