Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement named arguments function calling #10

Open
ceymard opened this issue Aug 24, 2011 · 0 comments
Open

Implement named arguments function calling #10

ceymard opened this issue Aug 24, 2011 · 0 comments
Labels

Comments

@ceymard
Copy link
Member

ceymard commented Aug 24, 2011

This can't be implemented on functions that comme from javascript.

However, it would be possible for macros, filters, and tests, to have an optional signature attribute with a list of arguments and a default_args to fill up the missing attributes when not specified.

Exemple ;

exports.dictsort = (value, case_sensitive ? false, _by ? 'value') ->
   ...
exports.dictsort.signature = ["value", "case_sensitive", "by"]
exports.dictsort.default_args = ["", false, "value"]

if a call is parsed and "by" is specified, then case_sensitive still gets sent false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant