/[papo]/papo/neb/neb/Parser.pm
ViewVC logotype

Diff of /papo/neb/neb/Parser.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by jlenton, Wed Apr 9 23:52:49 2003 UTC revision 1.5 by jlenton, Thu Apr 10 23:01:39 2003 UTC
# Line 8  use neb::Tree::Perl; Line 8  use neb::Tree::Perl;
8  use neb::Tree::Block;  use neb::Tree::Block;
9  use neb::Tree::Vars;  use neb::Tree::Vars;
10    
11  my %classes = ( Perl => 1,  # esto engancha como se llaman las clases con como se llaman los tags
12                  Block => 1,  # que invocan las clases.
13                  Vars => 1 );  my %classes = ( 'Inline' => 'Perl' );
14    
15  sub Init  sub Init
16  {  {
# Line 24  sub Start Line 24  sub Start
24  {  {
25      my $expat = shift;      my $expat = shift;
26      my $name = shift;      my $name = shift;
27      my $obj;      my $class = 'neb::Tree::';
28    
29      if ($name =~ m'^neb:(.*)$'i) {      if ($name =~ m'^neb:(.*)$'i)
30          $obj = ($classes{$1} ? "neb::Tree::$1" : "neb::Tree::Sub")->new($name, $expat->{'neb_parser_current'}->url);      {
31      } else {          $class .= exists $classes{$1} ? $classes{$1} : $1;
         $obj = neb::Tree::Tag->new($name, $expat->{'neb_parser_current'}->location);  
32      }      }
33      $obj->attributes(@_);      else
34        {
35            $class .= 'Tag';
36        }
37    
38        my $obj = $class->new($name, $expat->{'neb_parser_current'}->url, @_);
39    
40    #    $obj->attributes(@_);
41    
42      $expat->{"neb_parser_current"}->add_content($obj);      $expat->{"neb_parser_current"}->add_content($obj);
43    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26