Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 388b017bdc
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (17 sloc) 0.475 kB
use v6;
use Test;
plan 2;
# L<S05/Extensible metasyntax (C<< <...> >>)/If the first character is a colon>
grammar Grammar::With::Signatures {
token TOP {
<fred(1)>
<fred: 2, 3>
}
token fred($arg, $bar?) { #OK not used
| { $arg == 1 } 'bar'
| { $arg == 2 } 'foo'
}
}
ok(Grammar::With::Signatures.parse("barfoo"), 'barfoo matches');
ok(Grammar::With::Signatures.parse("foobar"), 'foobar doesnt match');
# vim: ft=perl6
Jump to Line
Something went wrong with that request. Please try again.