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

Version docs are wrong #2421

Closed
zoffixznet opened this issue Oct 27, 2018 · 4 comments
Closed

Version docs are wrong #2421

zoffixznet opened this issue Oct 27, 2018 · 4 comments
Labels
docs Documentation issue (primary issue type)

Comments

@zoffixznet
Copy link
Contributor

zoffixznet commented Oct 27, 2018

The docs https://docs.perl6.org/type/Version.html say "Version literals can only contain numeric and Whatever parts.", however that's demonstrably false:

<Zoffix__> m: v6.yes.you.can.^name.say
<camelia> rakudo-moar 7b0c5364f: OUTPUT: «Version␤»

And, at least based on Rakudo's patten, only the thing after the v must be a digit, but the rest of the parts match \w+ or WhateverStar.

    token vnum {
        \w+ | '*'
    }
    token version {
        <?before v\d+\w*> 'v' $<vstr>=[<vnum>+ % '.' '+'?]
        <!before '-'|\'> # cheat because of LTM fail
    }
@zoffixznet zoffixznet added docs Documentation issue (primary issue type) easy to resolve labels Oct 27, 2018
@coke
Copy link
Collaborator

coke commented Oct 27, 2018

Is it specced?

@AlexDaniel
Copy link
Member

Is it specced?

But v6.c itself has a non-numeric and non-whatever part in it… right?

@zoffixznet
Copy link
Contributor Author

And another pedantic correction: in the same paragraph it says Please note that method calls, including pseudo methods like WHAT require version literals to be enclosed with parentheses., but there are other ways to prevent the method from being interpreted as part of the literal:

<Zoffix__> m: v6.look.ma.no.parentheses .say
<camelia> rakudo-moar 7b0c5364f: OUTPUT: «v6.look.ma.no.parentheses␤»

@JJ JJ closed this as completed in 62d8495 Nov 2, 2018
@JJ JJ reopened this Nov 2, 2018
@JJ
Copy link
Contributor

JJ commented Nov 2, 2018

Reopening issue to address @ugexe concerns here: 62d8495

@JJ JJ closed this as completed in 4652d2f Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation issue (primary issue type)
Projects
None yet
Development

No branches or pull requests

4 participants