mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:15:06 +00:00
JSSpecCompiler: Store arguments in declaration instead of definition
And create a struct encapsulating argument name in the preparation for argument types and optional arguments.
This commit is contained in:
parent
0806ccaeec
commit
483e195e48
8 changed files with 57 additions and 40 deletions
|
@ -14,8 +14,8 @@ 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));
|
||||
for (auto argument : m_function->m_arguments)
|
||||
m_function->m_local_variables.set(argument.name, make_ref_counted<NamedVariableDeclaration>(argument.name));
|
||||
GenericASTPass::process_function();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue