mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 17:35:07 +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
|
@ -24,9 +24,9 @@ NonnullRefPtr<FunctionDefinition> CppASTConverter::convert()
|
|||
}
|
||||
auto tree = make_ref_counted<TreeList>(move(toplevel_statements));
|
||||
|
||||
Vector<StringView> arguments;
|
||||
Vector<FunctionArgument> arguments;
|
||||
for (auto const& parameter : m_function->parameters())
|
||||
arguments.append(parameter->full_name());
|
||||
arguments.append({ .name = parameter->full_name() });
|
||||
|
||||
return make_ref_counted<FunctionDefinition>(name, tree, move(arguments));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue