diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/General/Signals.pod | 6 | ||||
| -rwxr-xr-x | docs/buildpod.pl | 6 | ||||
| -rwxr-xr-x | docs/buildsignals.pl | 51 | 
3 files changed, 58 insertions, 5 deletions
| diff --git a/docs/General/Signals.pod b/docs/General/Signals.pod index f12dd7f..4720bee 100644 --- a/docs/General/Signals.pod +++ b/docs/General/Signals.pod @@ -131,7 +131,7 @@ Arguments are passed to signal handlers in the usual way, via C<@_>.  =over -=item C<string $command>, +=item string C<$command>,  =item L<Irssi::Server> C<$server>, @@ -2089,8 +2089,8 @@ B<TODO: Check ordering of arguments from/to here>  =back -B<TODO: does this fire if you dont' change windows? (eg: send a switch commandf -for the window you're already on) +B<TODO: does this fire if you don't change windows? (eg: send a switch command +for the window you're already on)>  =item C<"window changed automatic"> diff --git a/docs/buildpod.pl b/docs/buildpod.pl index 050ea8e..dfddf54 100755 --- a/docs/buildpod.pl +++ b/docs/buildpod.pl @@ -28,6 +28,12 @@ sub new {                          "<title>Irssi Scripting Documentation</title>\n",                          "</head><body class='contentspage'>\n",                          "<h1>Irssi Scripting Documentation</h1>\n", +                        q(<p><b>This is a work in progress. If you ), +                        q(find something obviously wrong, or have requests ), +                        q(for further documentation on topics not yet ), +                        q(filled out, please ), +                        q(<a href="http://github.com/shabble/shab-irssi-scripts/issues#">create an issue</a>), +                        " on my Github page, and I'll see what I can do.</b></p>",                         );      $obj->contents_page_start(join("", @index_header)); diff --git a/docs/buildsignals.pl b/docs/buildsignals.pl index 5409ae2..b2afc2a 100755 --- a/docs/buildsignals.pl +++ b/docs/buildsignals.pl @@ -4,8 +4,10 @@ use strict;  use warnings;  #use Pod::Simple::Debug (3);  use Data::Dumper; +$|++;  package Pod::Simple::IrssiSignalParser; +$|++;  use base qw/Pod::Simple::PullParser/;  use Carp qw/cluck/; @@ -91,7 +93,8 @@ sub validate_token {      my ($self, $token, $expected, $type) = @_;      unless ($token->type eq $type && $token->is_tag($expected)) { -        cluck "Eeek. Expected $expected: $type, got $token->type"; +        cluck "Eeek. Expected $expected: $type, got " +          . $token->dump();          # cluck("Invalid token. " # on line " . $token->attr('start_line')          #   . "expected $expected $type, got " . $token->tag @@ -174,8 +177,52 @@ sub process_def_entry {      my $token;      print "Processing definition entry\n";      while ($token = $self->get_token()) { +        print "Token is ", $token->dump, "\n";          last if $token->is_end && $token->tag eq 'item-text'; + +        $self->validate_token($token, 'item-text', 'start'); +        $token = $self->get_token(); +        $self->validate_token($token, 'C', 'start'); +        $token = $self->get_token(); + +        if ($token->is_text) { +            my $sig_name = $token->text; +            print "Signal: $sig_name\n"; +        } + +        $token = $self->get_token(); + +        $self->validate_token($token, 'C', 'end'); +        $token = $self->get_token(); +        print "matched end of code\n"; + +        $self->validate_token($token, 'item-text', 'end'); +        $token = $self->get_token(); + +        print "matched end of header list\n"; + +        $self->validate_token($token, 'over-text', 'start'); +        $token = $self->get_token(); + +        print "matched start of args list\n"; + +        $self->validate_token($token, 'item-text', 'start'); +        $token = $self->get_token(); + +        # consume argument list. +        until ($token->is_end && $token->tag eq 'over-text') { +            $token = $self->get_token(); +            print "waiting for arglist Token: " . $token->dump() . "\n"; +        } +        print "Token now: ", $token->dump(), $/; + +        print "consumed arg list\n"; +        $token = $self->get_token(); +        print "Token now: ", $token->dump(), $/; +        $self->validate_token($token, 'item-text', 'end'); +        $token = $self->get_token(); +      }      #$self->unget_token($token);      print "Done Processing definition entry\n"; @@ -184,7 +231,7 @@ sub process_def_entry {  package main; -my $input_file = $ARGV[0] // 'Signals.pm'; +my $input_file = $ARGV[0] // 'General/Signals.pod';  my $parser = Pod::Simple::IrssiSignalParser->new;  $parser->accept_targets('irssi_signal_defs', 'irssi_signal_types'); | 
