[Lxr-commits] CVS: lxr/lib/LXR Lang.pm,1.33,1.34
Brought to you by:
ajlittoz
From: AdrianIssott <adr...@us...> - 2009-04-12 16:10:41
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10214/lib/LXR Modified Files: Lang.pm Log Message: * Removed invalid dependency from LXR::Lang -> LXR::Lang::Generic introduced in fix for bug 2752690 (C / C++ pre-processor keywords aren't marked as reserved) * Clarified LXR::Lang interface by giving a dummy implementation for all required subroutines Index: Lang.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang.pm,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- Lang.pm 11 Apr 2009 11:23:43 -0000 1.33 +++ Lang.pm 12 Apr 2009 16:10:37 -0000 1.34 @@ -74,16 +74,7 @@ sub processinclude { my ($self, $frag, $dir) = @_; - # Replace reserved words - $$frag =~ - s{ - (^|[^\w\#])([\w~\#][\w]*)\b - } - { - $1. - ( $self->isreserved($2) ? "<span class='reserved'>$2</span>" : $2 ). - $3; - }gex; + $self->processreserved($frag); $$frag =~ s#(\")(.*?)(\")#$1.&LXR::Common::incref($2, "include", $2, $dir).$3 #e; $$frag =~ s#(\0<)(.*?)(\0>)#$1.&LXR::Common::incref($2, "include", $2).$3 #e; @@ -96,19 +87,24 @@ $$frag =~ s#\n#</span>\n<span class=\"comment\">#g; } -sub referencefile { +sub processcode { + my ($self) = @_; + print(STDERR ref($self), "->processcode not implemented.\n"); +} + +sub processreserved { my ($self) = @_; + print(STDERR ref($self), "->processreserved not implemented.\n"); +} +sub referencefile { + my ($self) = @_; print(STDERR ref($self), "->referencefile not implemented.\n"); } -sub isreserved { - my ($self, $frag) = @_; - - foreach my $word (@{$self->langinfo('reserved')}) { - return 1 if $frag eq $word; - } - return 0; +sub language { + my ($self) = @_; + print(STDERR ref($self), "->language not implemented.\n"); } 1; |