mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
Shell: Allow appending empty string literals
Otherwise, we just silently drop arguments that are empty strings.
This commit is contained in:
parent
c26639eac2
commit
46c22ee49d
Notes:
sideshowbarker
2024-07-16 22:14:49 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/46c22ee49d Pull-request: https://github.com/SerenityOS/serenity/pull/18012 Reviewed-by: https://github.com/alimpfard
@ -1435,9 +1435,6 @@ ErrorOr<RefPtr<AST::Node>> Parser::parse_word()
|
||||
};
|
||||
|
||||
auto append_string_literal = [&](StringView string) -> ErrorOr<void> {
|
||||
if (string.is_empty())
|
||||
return {};
|
||||
|
||||
auto node = make_ref_counted<AST::StringLiteral>(
|
||||
token.position.value_or(empty_position()),
|
||||
TRY(String::from_utf8(string)),
|
||||
@ -1457,9 +1454,6 @@ ErrorOr<RefPtr<AST::Node>> Parser::parse_word()
|
||||
};
|
||||
|
||||
auto append_string_part = [&](StringView string) -> ErrorOr<void> {
|
||||
if (string.is_empty())
|
||||
return {};
|
||||
|
||||
auto node = make_ref_counted<AST::StringLiteral>(
|
||||
token.position.value_or(empty_position()),
|
||||
TRY(String::from_utf8(string)),
|
||||
|
Loading…
Reference in New Issue
Block a user