mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:27:35 +00:00
Shell: Expand Juxtaposition of lists to list products
This commit makes `echo x(foo bar)` create an argv of `echo xfoo xbar`, essentially modeling brace expansions in some shells.
This commit is contained in:
parent
16def040af
commit
8e078cf4ab
5 changed files with 119 additions and 68 deletions
|
@ -690,17 +690,17 @@ private:
|
|||
char m_name { -1 };
|
||||
};
|
||||
|
||||
class StringConcatenate final : public Node {
|
||||
class Juxtaposition final : public Node {
|
||||
public:
|
||||
StringConcatenate(Position, RefPtr<Node>, RefPtr<Node>);
|
||||
virtual ~StringConcatenate();
|
||||
Juxtaposition(Position, RefPtr<Node>, RefPtr<Node>);
|
||||
virtual ~Juxtaposition();
|
||||
|
||||
private:
|
||||
virtual void dump(int level) const override;
|
||||
virtual RefPtr<Value> run(TheExecutionInputType) override;
|
||||
virtual void highlight_in_editor(Line::Editor&, Shell&, HighlightMetadata = {}) override;
|
||||
virtual HitTestResult hit_test_position(size_t) override;
|
||||
virtual String class_name() const override { return "StringConcatenate"; }
|
||||
virtual String class_name() const override { return "Juxtaposition"; }
|
||||
|
||||
RefPtr<Node> m_left;
|
||||
RefPtr<Node> m_right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue