diff options
Diffstat (limited to 'Userland/Shell/AST.cpp')
-rw-r--r-- | Userland/Shell/AST.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index ef79901c67..f069b2c5a7 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -2736,6 +2736,15 @@ HitTestResult Sequence::hit_test_position(size_t offset) const return {}; } +RefPtr<Node> Sequence::leftmost_trivial_literal() const +{ + for (auto& entry : m_entries) { + if (auto node = entry.leftmost_trivial_literal()) + return node; + } + return nullptr; +} + Sequence::Sequence(Position position, NonnullRefPtrVector<Node> entries, Vector<Position> separator_positions) : Node(move(position)) , m_entries(move(entries)) |