Skip to content

Conversation

@5lbBookOfGre
Copy link
Contributor

Summary

  • More granular control over "keep_simple_block_one_line".
  • This should be backward compatible.
  • Note, I haven't updated README.md or other docs yet; I will do that once I get approval for this change.

Thank you!

@tammela
Copy link
Contributor

tammela commented Jan 6, 2020

I would move your tests cases from test/test_config.cpp to the same structure we use in test/test_format_file.cpp. Other than that the feature is much welcome in my opinion.

Thanks!

antlrcpp::Any visitDoStat(LuaParser::DoStatContext* context) override;
antlrcpp::Any visitWhileStat(LuaParser::WhileStatContext* context) override;
antlrcpp::Any visitRepeatStat(LuaParser::RepeatStatContext* context) override;
antlrcpp::Any visitWhileStat(LuaParser::WhileStatContext* context) override; antlrcpp::Any visitRepeatStat(LuaParser::RepeatStatContext* context) override;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line break

@Koihik
Copy link
Owner

Koihik commented Jan 6, 2020

I prefer this two config name: keep_simple_block_one_line & keep_simple_function_one_line

@5lbBookOfGre
Copy link
Contributor Author

Thank you for the response!

I prefer this two config name: keep_simple_block_one_line & keep_simple_function_one_line

That won't be backward compatiblity for people who have been using keep_simple_block_one_line=false. I don't know how much you care about the backward compatibility, so if you don't care much about it, then please let me know. I will fix it.

@Koihik
Copy link
Owner

Koihik commented Jan 7, 2020

Thank you for the response!

I prefer this two config name: keep_simple_block_one_line & keep_simple_function_one_line

That won't be backward compatiblity for people who have been using keep_simple_block_one_line=false. I don't know how much you care about the backward compatibility, so if you don't care much about it, then please let me know. I will fix it.

I thought backward compatiblity don't have to be that strict.

@5lbBookOfGre 5lbBookOfGre force-pushed the 01_type_based_single_block branch from f47e86a to 02e98b4 Compare January 7, 2020 13:51
@5lbBookOfGre
Copy link
Contributor Author

Updated. Using keep_simple_control_block_one_line instead of keep_simple_block_one_line, because both function body and control blocks are called as "block" in the code and I do not want to confuse future readers.

Thanks!

@5lbBookOfGre
Copy link
Contributor Author

Shoot, found a bug in the test file. Will fix it later.

"keep_simple_control_block_one_line".
@5lbBookOfGre 5lbBookOfGre force-pushed the 01_type_based_single_block branch from 02e98b4 to 3d3bdb9 Compare January 7, 2020 17:36
@Koihik Koihik merged commit 310cecb into Koihik:master Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants