LibJS: Use the source offset to sort imports in module

Using source offsets directly means we don't have to synthesize any
SourceRanges and circumvents that SourceRange returns invalid values for
the last range of a file.
This commit is contained in:
davidot 2022-11-27 01:15:37 +01:00 committed by Linus Groh
commit 0c4befd811
Notes: sideshowbarker 2024-07-17 10:05:47 +09:00
2 changed files with 6 additions and 6 deletions

View file

@ -54,6 +54,7 @@ public:
virtual void dump(int indent) const;
[[nodiscard]] SourceRange source_range() const;
u32 start_offset() const { return m_start_offset; }
void set_end_offset(Badge<Parser>, u32 end_offset) { m_end_offset = end_offset; }