mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibJS: Allow cells to mark null pointers
This simplifies the cell visiting functions by letting them not worry about the pointers they pass to the visitor being null.
This commit is contained in:
parent
1f4e3dd073
commit
1b391d78ae
5 changed files with 16 additions and 13 deletions
|
@ -49,8 +49,11 @@ public:
|
|||
|
||||
class Visitor {
|
||||
public:
|
||||
virtual void visit(Cell*) = 0;
|
||||
void visit(Cell*);
|
||||
void visit(Value);
|
||||
|
||||
protected:
|
||||
virtual void visit_impl(Cell*) = 0;
|
||||
};
|
||||
|
||||
virtual void visit_children(Visitor&) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue