1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-23 14:07:42 +00:00

LibGUI: Remove unnecessary braces

This commit is contained in:
thislooksfun 2021-10-27 19:53:30 -05:00 committed by Andreas Kling
parent 4e5bf5c138
commit 6c776d267a

View file

@ -198,7 +198,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
break; break;
} }
case InIdentifier: { case InIdentifier:
if (after_token_on_same_line) { if (after_token_on_same_line) {
// After an identifier, but with extra space // After an identifier, but with extra space
// TODO: Maybe suggest a colon? // TODO: Maybe suggest a colon?
@ -207,8 +207,7 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
register_properties_and_widgets_matching_pattern(make_fuzzy(identifier_string), identifier_string.length()); register_properties_and_widgets_matching_pattern(make_fuzzy(identifier_string), identifier_string.length());
break; break;
} case AfterClassName:
case AfterClassName: {
if (last_seen_token && last_seen_token->m_end.line == cursor.line()) { if (last_seen_token && last_seen_token->m_end.line == cursor.line()) {
if (last_seen_token->m_type != GUI::GMLToken::Type::Identifier || last_seen_token->m_end.column != cursor.column()) { if (last_seen_token->m_type != GUI::GMLToken::Type::Identifier || last_seen_token->m_end.column != cursor.column()) {
// Inside braces, but on the same line as some other stuff (and not the continuation of one!) // Inside braces, but on the same line as some other stuff (and not the continuation of one!)
@ -219,7 +218,6 @@ void GMLAutocompleteProvider::provide_completions(Function<void(Vector<Entry>)>
register_properties_and_widgets_matching_pattern("*", 0u); register_properties_and_widgets_matching_pattern("*", 0u);
break; break;
}
case AfterIdentifier: case AfterIdentifier:
if (last_seen_token && last_seen_token->m_end.line != cursor.line()) if (last_seen_token && last_seen_token->m_end.line != cursor.line())
break; break;