diff options
author | Zoffix Znet <cpan@zoffix.com> | 2016-06-05 21:39:47 -0400 |
---|---|---|
committer | Zoffix Znet <cpan@zoffix.com> | 2016-06-05 21:39:47 -0400 |
commit | 140959e4f170d732d990e69b9a0ca129b89e3ac4 (patch) | |
tree | c96d92c8eba8af28eea21585c1c0e5c8a18f69d7 /lib/old-IRC/Grammar/Actions.pm6 | |
parent | 16056e8af837a4d982d23728adf24b4cc406576c (diff) |
First working test
Diffstat (limited to 'lib/old-IRC/Grammar/Actions.pm6')
-rw-r--r-- | lib/old-IRC/Grammar/Actions.pm6 | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/old-IRC/Grammar/Actions.pm6 b/lib/old-IRC/Grammar/Actions.pm6 deleted file mode 100644 index 234e392..0000000 --- a/lib/old-IRC/Grammar/Actions.pm6 +++ /dev/null @@ -1,26 +0,0 @@ -unit class IRC::Grammar::Actions; -method TOP ($/) { $/.make: $<message>>>.made } -method message ($/) { - my $pref = $/<prefix>; - my %args = command => ~$/<command>; - for qw/nick user host/ { - $pref{$_}.defined or next; - %args<who>{$_} = $pref{$_}.Str; - } - %args<who><host> = ~$pref<servername> if $pref<servername>.defined; - - my $p = $/<params>; - - for ^100 { # bail out after 100 iterations; we're stuck - if ( $p<middle>.defined ) { - %args<params>.append: ~$p<middle>; - } - if ( $p<trailing>.defined ) { - %args<params>.append: ~$p<trailing>; - last; - } - $p = $p<params>; - } - - $/.make: %args; -} |