diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h b/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h index 953141b352..6ee75de691 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/SegmentIterator.h @@ -16,14 +16,17 @@ class SegmentIterator final : public Object { JS_OBJECT(SegmentIterator, Object); public: - static SegmentIterator* create(GlobalObject&, Segmenter&, Utf16View const&); + static SegmentIterator* create(GlobalObject&, Segmenter&, Utf16View const&, Segments const&); - SegmentIterator(GlobalObject&, Segmenter&, Utf16View const&); + SegmentIterator(GlobalObject&, Segmenter&, Utf16View const&, Segments const&); virtual ~SegmentIterator() override = default; Segmenter const& iterating_segmenter() const { return m_iterating_segmenter; } Utf16View const& iterated_string() const { return m_iterated_string; } size_t iterated_string_next_segment_code_unit_index() const { return m_iterated_string_next_segment_code_unit_index; } + void set_iterated_string_next_segment_code_unit_index(size_t index) { m_iterated_string_next_segment_code_unit_index = index; } + + Segments const& segments() { return m_segments; } private: virtual void visit_edges(Cell::Visitor&) override; @@ -31,6 +34,8 @@ private: Segmenter& m_iterating_segmenter; // [[IteratingSegmenter]] Utf16View m_iterated_string; // [[IteratedString]] size_t m_iterated_string_next_segment_code_unit_index { 0 }; // [[IteratedStringNextSegmentCodeUnitIndex]] + + Segments const& m_segments; }; } |