Want more features on Pastebin? Sign Up, it's FREE!
Guest

EPIC eclipse plugin weird highlighting

By: a guest on Mar 10th, 2011  |  syntax: Perl  |  size: 1.27 KB  |  views: 62  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/usr/bin/env perl
  2.  
  3. sub another_sub {
  4.   my ($args_ref) = @_;
  5. }
  6.  
  7. sub parse_config_line {
  8.   local $_=shift;
  9.   my $confs=shift;
  10.   my $key;
  11.   unless (/^\s*[;\#]/ or /^\s*$/) {
  12.     chomp;
  13.     if (/^\s*([a-zA-Z_]+[a-zA-Z_0-9]*(::[a-zA-Z_]+[a-zA-Z_0-9:]*)?)\s*=\s*('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*"|(?:\s*(?:[^;\\\s]|\\.)+)*)/) {
  14.       $key = $2 ? $1 : lc($1);
  15.       $confs->{$key}=$3;
  16.       $confs->{$key}=~s/\\(.)/$1/g;
  17.       $confs->{$key}=$1 if ($confs->{$key}=~/^'(.*)'$/ or $confs->{$key}=~/^"(.*)"$/);
  18.     }
  19.   }
  20. }
  21.  
  22.  
  23.  
  24. sub another_sub2 {
  25.   my ($args_ref) = @_;
  26. }
  27.  
  28. sub another_sub3 {
  29.   if (/^\s*([a-zA-Z_]+[a-zA-Z_0-9]*(::[a-zA-Z_]+[a-zA-Z_0-9:]*)?)\s*=\s*('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*"|(?:\s*(?:[^;\\\s]|\\.)+)*)/) {
  30.       $key = $2 ? $1 : lc($1);
  31.       $confs->{$key}=$3;
  32.       $confs->{$key}=~s/\\(.)/$1/g;
  33.       $confs->{$key}=$1 if ($confs->{$key}=~/^'(.*)'$/ or $confs->{$key}=~/^"(.*)"$/);
  34.     }
  35. }
  36.  
  37. sub another_sub4 {
  38.   if (/^\s*([a-zA-Z_]+[a-zA-Z_0-9]*(::[a-zA-Z_]+[a-zA-Z_0-9:]*)?)\s*=\s*('(?:[^\\']|\\.)*'|"(?:[^\\"]|\\.)*"|(?:\s*(?:[^;\\\s]|\\.)+)*)/) {
  39.       $key = $2 ? $1 : lc($1);
  40.       $confs->{$key}=$3;
  41.       $confs->{$key}=~s/\\(.)/$1/g;
  42.       $confs->{$key}=$1 if ($confs->{$key}=~/^'(.*)'$/ or $confs->{$key}=~/^"(.*)"$/);
  43.     }
  44. }
clone this paste RAW Paste Data