Changeset 12003


Ignore:
Timestamp:
07/25/10 20:43:07 (19 months ago)
Author:
chorny
Message:

keywords added to autocompletition

Location:
trunk/Padre-Plugin-PHP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-PHP/Changes

    r11195 r12003  
    22 
    33    00-load.t added (CHORNY) 
     4    keywords added to autocompletition (CHORNY) 
    45 
    56v0.03   2009.11.08 
  • trunk/Padre-Plugin-PHP/lib/Padre/Document/PHP.pm

    r9078 r12003  
    9999        return ("Cannot build regex for '$prefix'"); 
    100100    } 
     101    my @keywords=qw/abstract     and     array       as      break 
     102case    catch   cfunction   class   clone 
     103const   continue    declare     default     do 
     104else    elseif  enddeclare  endfor  endforeach 
     105endif   endswitch   endwhile    extends     final 
     106for     foreach     function    global  goto 
     107if  implements  interface   instanceof 
     108namespace   new     old_function    or  private 
     109protected   public  static  switch  throw 
     110try     use     var     while   xor/; 
    101111 
    102112    my %seen; 
    103113    my @words; 
     114    push @words, grep { $_ =~ $regex and !$seen{$_}++} @keywords; 
    104115    push @words, grep { !$seen{$_}++ } reverse( $pre_text =~ /$regex/g ); 
    105116    push @words, grep { !$seen{$_}++ } ( $post_text =~ /$regex/g ); 
Note: See TracChangeset for help on using the changeset viewer.