mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 08:57:35 +00: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
1 changed files with 0 additions and 6 deletions
|
@ -1435,9 +1435,6 @@ ErrorOr<RefPtr<AST::Node>> Parser::parse_word()
|
||||||
};
|
};
|
||||||
|
|
||||||
auto append_string_literal = [&](StringView string) -> ErrorOr<void> {
|
auto append_string_literal = [&](StringView string) -> ErrorOr<void> {
|
||||||
if (string.is_empty())
|
|
||||||
return {};
|
|
||||||
|
|
||||||
auto node = make_ref_counted<AST::StringLiteral>(
|
auto node = make_ref_counted<AST::StringLiteral>(
|
||||||
token.position.value_or(empty_position()),
|
token.position.value_or(empty_position()),
|
||||||
TRY(String::from_utf8(string)),
|
TRY(String::from_utf8(string)),
|
||||||
|
@ -1457,9 +1454,6 @@ ErrorOr<RefPtr<AST::Node>> Parser::parse_word()
|
||||||
};
|
};
|
||||||
|
|
||||||
auto append_string_part = [&](StringView string) -> ErrorOr<void> {
|
auto append_string_part = [&](StringView string) -> ErrorOr<void> {
|
||||||
if (string.is_empty())
|
|
||||||
return {};
|
|
||||||
|
|
||||||
auto node = make_ref_counted<AST::StringLiteral>(
|
auto node = make_ref_counted<AST::StringLiteral>(
|
||||||
token.position.value_or(empty_position()),
|
token.position.value_or(empty_position()),
|
||||||
TRY(String::from_utf8(string)),
|
TRY(String::from_utf8(string)),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue