Skip to content

Commit

Permalink
fix code typo that didn't compile.
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Jul 27, 2018
1 parent ebc8cb2 commit dd1295a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/Language/grammars.pod6
Expand Up @@ -368,6 +368,7 @@ itself. Note that mutating an attribute from within a method called in a token
will I<only modify the attribute for that token's own match object>! Grammar
attributes can be accessed in the match returned after parsing if made public:
=begin code
grammar HTTPRequest {
has Bool $.invalid;
Expand Down Expand Up @@ -400,14 +401,15 @@ attributes can be accessed in the match returned after parsing if made public:
}
}
my $header = "MEOWS / HTTP/1.1\r\nHost: docs.perl6.org\r\nsup lol\r\n\r\n";.
my $header = "MEOWS / HTTP/1.1\r\nHost: docs.perl6.org\r\nsup lol\r\n\r\n";
my $/ = HTTPRequest.parse($header);
say $<type>.invalid;
# OUTPUT: True
say $<path>.invalid;
# OUTPUT: (Bool)
say $<field>».invalid;
# OUTPUT: [(Bool) True]
=end code
X<|Actions>
=head1 Action objects
Expand Down

0 comments on commit dd1295a

Please sign in to comment.