Closed andre2007 closed 1 year ago
It looks like parseArguments
is using parseAssignExp
. I think you'll need to get the argument names of the function you are 'in', look ahead and ensure there's a TOK.colon
, then look ahead to get the value of the variable and somehow match it up.
Hopefully, this is enough to help someone start :grinning:.
The issue with this is the semantic analysis. Parsing can be implemented in minutes
Some work from October: https://github.com/dlang/dmd/pull/14575
Dennis Korpel has been working on this with multiple PRs and is nearing completion. I'm going to go ahead and close the issue.
Description
The DIP [1] for named arguments has been accepted, however it has not been implemented.
In a nutshell, implementing named arguments means adding the compiler code so that this function:
that can currently be called by
will also be callable as:
[1] https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1030.md
What are rough milestones of this project?
Expected outcome
A pull request to the compiler that implements the named arguments feature, containing all the deliverables from the above mentioned milestones.
How does this project help the D community?
Named arguments is a long awaited feature by both the D community and the language users. Implementing this feature does not only improve the language, but also it also helps D from an image standpoint.
Recommended skills
D\C++, OOP, Compilers
What can students expect to get out of doing this project?
Learn compiler internals
Rating
Medium-Hard
Project type
Core development
Points of contact/Potential Mentors
@RazvanN7
References
https://forum.dlang.org/thread/bizqhxszbobynrimsgai@forum.dlang.org https://forum.dlang.org/thread/bnubytbrlutpnhjgvlfy@forum.dlang.org