mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 13:55:08 +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
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