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

Some Function::Parameters syntax not supported #15

Open
iynehz opened this issue Dec 28, 2017 · 2 comments
Open

Some Function::Parameters syntax not supported #15

iynehz opened this issue Dec 28, 2017 · 2 comments

Comments

@iynehz
Copy link

iynehz commented Dec 28, 2017

Like the named parameters as described at https://metacpan.org/pod/Function::Parameters#Named-parameters

@iynehz
Copy link
Author

iynehz commented Dec 29, 2017

Now I confirm it's also somewhat related the the same issue as #13. and #14 can fix the error, although it's still not well tidied. For example,

use 5.014;
use Function::Parameters;

fun foo (: $x     = 1, :    $y =    2) {
    say "$x, $y";
}

Without #14 you get an error with perltidier. With #14 the error is gone, but the signatures are not tidied at all. It would be ideal to tidy it to like below,

fun foo (:$x = 1, :$y = 2) {
    say "$x, $y";
}

@mvgrimes
Copy link
Owner

#14 has been merged.

Signatures are not tidied for any of the keywords (as mentioned in docs). I'm open to adding that, but it would take quite a bit of work. Patches are welcome!

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

No branches or pull requests

2 participants