1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

LibJS: Capture UnrealizedSourceRanges in ExecutionContext, not ASTNodes

This loosens the connection to the AST interpreter and will allow us to
generate SourceRanges for the Bytecode interpreter in the future as well

Moves UnrealizedSourceRanges from TracebackFrame to the JS namespace for
this
This commit is contained in:
Hediadyoin1 2023-07-27 14:40:01 +02:00 committed by Andreas Kling
parent cd9bb985d4
commit 50bf303edd
11 changed files with 33 additions and 32 deletions

View file

@ -58,6 +58,10 @@ public:
virtual void dump(int indent) const;
[[nodiscard]] SourceRange source_range() const;
UnrealizedSourceRange unrealized_source_range() const
{
return { m_source_code, m_start_offset, m_end_offset };
}
u32 start_offset() const { return m_start_offset; }
u32 end_offset() const { return m_end_offset; }