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:
parent
cd9bb985d4
commit
50bf303edd
11 changed files with 33 additions and 32 deletions
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue