ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/ActiveDoc/Switcher.pm
(Generate patch)

Comparing COMP/SCRAM/src/ActiveDoc/Switcher.pm (file contents):
Revision 1.8 by williamc, Wed Nov 17 17:57:33 1999 UTC vs.
Revision 1.12 by williamc, Tue Nov 23 17:20:40 1999 UTC

# Line 13 | Line 13
13   # usegroupchecker(groupchecker)    : Set a groupchecker
14   # parse()                          : Parse the file                            
15   # line()                    : return the current line number of the parse
16 + # tagstartline()            : return the line number on which the current
17 + #                             tag was opened
18   # stream(filehandle)        : stream output to the filehandle if not handled
19   #                               in any other way
20   package ActiveDoc::Switcher;
# Line 113 | Line 115 | sub line {
115          my $self=shift;
116          return $self->{linecount};
117   }
118 +
119 + # return the line the current tag was opened
120 + sub tagstartline {
121 +        my $self=shift;
122 +        $self->{tagstart};
123 + }
124   # --------------- Utility routines ----------------------------
125  
126   #
# Line 172 | Line 180 | sub _opentag {
180          my $self=shift;
181          my $char;
182  
183 +        # Keep a record of where the tag started
184 +        $self->{tagstart}=$self->line();
185 +
186          # Close the last text segment
187          $self->{streamtmp}=$self->_popstream();
188          $self->_calltag($self->{textcontext}, $self->{textcontext},
# Line 354 | Line 365 | sub _labeltest {
365   sub _resetlabels {
366          my $self=shift;
367          undef $self->{tagvar};
368 +        undef $self->{tagname};
369   }
370  
371   sub _closelabel {
# Line 365 | Line 377 | sub _closelabel {
377           $self->{lastlabel}="";
378          }
379          elsif ( $self->_getstore() ne "") {
380 <         #Then it must be the tag name
381 <         ($self->{tagname}=$self->_getstore())=~tr/A-Z/a-z/;
380 >         # Then it must be the tag name
381 >         if ( ! defined $self->{tagname} ) {
382 >            ($self->{tagname}=$self->_getstore())=~tr/A-Z/a-z/;
383 >         }
384 >         else {
385 >            die ">Tag syntax error in $self->{tagname} on line ".
386 >                $self->line()." of file \n$self->{filename}";
387 >         }
388          }
389          $self->_resetstore();
390   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines