mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
JSSpecCompiler: Save references to return value and function arguments
This commit is contained in:
parent
7f47340c82
commit
5825eaa264
10 changed files with 89 additions and 49 deletions
|
@ -12,6 +12,13 @@
|
|||
|
||||
namespace JSSpecCompiler {
|
||||
|
||||
void ReferenceResolvingPass::process_function()
|
||||
{
|
||||
for (auto name : m_function->m_argument_names)
|
||||
m_function->m_local_variables.set(name, make_ref_counted<NamedVariableDeclaration>(name));
|
||||
GenericASTPass::process_function();
|
||||
}
|
||||
|
||||
RecursionDecision ReferenceResolvingPass::on_entry(Tree tree)
|
||||
{
|
||||
if (auto binary_operation = as<BinaryOperation>(tree); binary_operation) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue