1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:37:35 +00:00

Shell: Add the (now) free subshell support

This commit is contained in:
AnotherTest 2020-09-08 15:59:07 +04:30 committed by Andreas Kling
parent 0fd8d5ad3d
commit b194d79c53
4 changed files with 92 additions and 0 deletions

View file

@ -806,6 +806,22 @@ private:
RefPtr<Node> m_right;
};
class Subshell final : public Node {
public:
Subshell(Position, RefPtr<Node> block);
virtual ~Subshell();
private:
virtual void dump(int level) const override;
virtual RefPtr<Value> run(RefPtr<Shell>) 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 "Subshell"; }
virtual bool would_execute() const override { return true; }
RefPtr<AST::Node> m_block;
};
class SimpleVariable final : public Node {
public:
SimpleVariable(Position, String);