koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.6,1.7 TmplToken.


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.6,1.7 TmplToken.pm,1.1,1.2
Date: Mon, 16 Feb 2004 21:42:29 -0800

Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3053

Modified Files:
        TmplTokenizer.pm TmplToken.pm 
Log Message:
Insert the filename of the token into the TmplToken object too


Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** TmplTokenizer.pm    17 Feb 2004 05:07:04 -0000      1.6
--- TmplTokenizer.pm    17 Feb 2004 05:42:27 -0000      1.7
***************
*** 121,124 ****
--- 121,129 ----
  # Simple getters
  
+ sub filename {
+     my $this = shift;
+     return $this->{+FILENAME};
+ }
+ 
  sub _handle {
      my $this = shift;
***************
*** 356,360 ****
      warn_normal "Unrecognizable token found: $it\n", $this->line_number_start
            if $kind eq TmplTokenType::UNKNOWN;
!     return defined $it? (ref $it? $it: TmplToken->new($it, $kind, 
$this->line_number)): undef;
  }
  
--- 361,365 ----
      warn_normal "Unrecognizable token found: $it\n", $this->line_number_start
            if $kind eq TmplTokenType::UNKNOWN;
!     return defined $it? (ref $it? $it: TmplToken->new($it, $kind, 
$this->line_number, $this->filename)): undef;
  }
  

Index: TmplToken.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplToken.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** TmplToken.pm        17 Feb 2004 02:45:27 -0000      1.1
--- TmplToken.pm        17 Feb 2004 05:42:27 -0000      1.2
***************
*** 33,37 ****
      my $self = {};
      bless $self, $class;
!     ($self->{'_string'}, $self->{'_type'}, $self->{'_lc'}) = @_;
      return $self;
  }
--- 33,37 ----
      my $self = {};
      bless $self, $class;
!     ($self->{'_string'}, $self->{'_type'}, $self->{'_lc'}, $self->{'_path'}) 
= @_;
      return $self;
  }
***************
*** 47,50 ****
--- 47,55 ----
  }
  
+ sub pathname {
+     my $this = shift;
+     return $this->{'_path'}
+ }
+ 
  sub line_number {
      my $this = shift;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]