mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 19:38:12 +00:00
Shell: Implement for_each_entry()
for syntactic list nodes
This allows correct iteration over nested lists. Also store values to variables without resolving them, to delay the resolution step as much as possible (this helps with storing nested lists in variables).
This commit is contained in:
parent
fc7a06af9d
commit
1c78d12f1c
2 changed files with 24 additions and 10 deletions
|
@ -558,6 +558,7 @@ public:
|
|||
private:
|
||||
NODE(ListConcatenate);
|
||||
virtual void dump(int level) const override;
|
||||
virtual void for_each_entry(RefPtr<Shell> shell, Function<IterationDecision(NonnullRefPtr<Value>)> callback) 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;
|
||||
|
@ -656,6 +657,7 @@ private:
|
|||
NODE(CastToList);
|
||||
virtual void dump(int level) const override;
|
||||
virtual RefPtr<Value> run(RefPtr<Shell>) override;
|
||||
virtual void for_each_entry(RefPtr<Shell> shell, Function<IterationDecision(NonnullRefPtr<Value>)> callback) override;
|
||||
virtual void highlight_in_editor(Line::Editor&, Shell&, HighlightMetadata = {}) override;
|
||||
virtual HitTestResult hit_test_position(size_t) override;
|
||||
virtual bool is_list() const override { return true; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue