1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 19:07:36 +00:00

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
parent 1dc9769f7d
commit 0c4befd811
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; }