Raku / doc

🦋 Raku documentation
https://docs.raku.org/
Artistic License 2.0
286 stars 293 forks source link

Named captures in Grammars (S05) not documented #2610

Open ufobat opened 5 years ago

ufobat commented 5 years ago
<ufobat> how does <foo=bar> in grammars work?
<ufobat> https://github.com/ash/lingua/blob/master/LinguaGrammar.pm#L8 <- example of it
<ufobat> I wasn't able to find it in the documentation :-(
<masak> ufobat: calls the subrule `bar`, but assigns to the match key `foo`
<masak> so that it's later accessible as $<foo>
<masak> (hi, #perl6)
<ufobat> it is not neccessarry to have a rule foo, in my example?
<masak> no, it's just the name of a key
<ufobat> thank you, masak 
ufobat commented 5 years ago

https://design.perl6.org/S05.html#line_1437