aboutsummaryrefslogtreecommitdiff
path: root/lib/IRC/Grammar/Actions.pm6
diff options
context:
space:
mode:
authorZoffix Znet <zoffixznet@users.noreply.github.com>2016-07-26 08:50:02 -0400
committerGitHub <noreply@github.com>2016-07-26 08:50:02 -0400
commite0478c07e2096d85e20764c08c83a3d16c002e94 (patch)
tree592510005886adaadb49848d289c5c712279ecee /lib/IRC/Grammar/Actions.pm6
parente997c1b0b5ad796425abfc9f81b91947357172ce (diff)
parentcc19189ff6b74bea5211d521a59dbff0c71a0749 (diff)
Merge Rewrite 2.0 version into master
Old version should not be used anymore and 2.0 is ready to go, sans some bugs
Diffstat (limited to 'lib/IRC/Grammar/Actions.pm6')
-rw-r--r--lib/IRC/Grammar/Actions.pm626
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/IRC/Grammar/Actions.pm6 b/lib/IRC/Grammar/Actions.pm6
deleted file mode 100644
index 234e392..0000000
--- a/lib/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;
-}