mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
Shell: Do not treat the ending newline as part of a comment
This allows the parser to finally parse the entire source into a single AST. As a result of allowing comments inside sequences, Sequence is also marked as would_execute if its left or right node would.
This commit is contained in:
parent
6d17fe38a4
commit
f9d3055691
4 changed files with 24 additions and 7 deletions
|
@ -699,6 +699,7 @@ private:
|
|||
virtual HitTestResult hit_test_position(size_t) override;
|
||||
virtual String class_name() const override { return "Sequence"; }
|
||||
virtual bool is_list() const override { return true; }
|
||||
virtual bool would_execute() const override { return m_left->would_execute() || m_right->would_execute(); }
|
||||
|
||||
RefPtr<Node> m_left;
|
||||
RefPtr<Node> m_right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue