mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibJS: Track source positions all the way down to exceptions
This makes exceptions have a trace of source positions too, which could probably be helpful in making fancier error tracebacks.
This commit is contained in:
parent
f17874ecd2
commit
b34b681811
Notes:
sideshowbarker
2024-07-19 00:28:37 +09:00
Author: https://github.com/alimpfard
Commit: b34b681811
Pull-request: https://github.com/SerenityOS/serenity/pull/4606
Reviewed-by: https://github.com/awesomekling
10 changed files with 647 additions and 245 deletions
|
@ -143,6 +143,16 @@ void Interpreter::exit_scope(const ScopeNode& scope_node)
|
|||
vm().unwind(ScopeType::None);
|
||||
}
|
||||
|
||||
void Interpreter::enter_node(const ASTNode& node)
|
||||
{
|
||||
vm().push_ast_node(node);
|
||||
}
|
||||
|
||||
void Interpreter::exit_node(const ASTNode&)
|
||||
{
|
||||
vm().pop_ast_node();
|
||||
}
|
||||
|
||||
void Interpreter::push_scope(ScopeFrame frame)
|
||||
{
|
||||
m_scope_stack.append(move(frame));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue