LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File enscript-1.6.4-perl_parens.patch of Package enscript (Project openSUSE:11.4)

--- states/hl/perl.st
+++ states/hl/perl.st	2010-03-31 00:00:00.000000000 +0000
@@ -4,6 +4,7 @@
  *
  * Author: Jim Villani, Logistics Management Institute (jvillani@lmi.org)
  *         perl_pod mods by Gregor Purdy (gregor@focusresearch.com)
+ *         perl_parens by Josh Zenker (josh.zenker@sig.com)
  */
 
 state perl_pod extends Highlight
@@ -58,6 +59,18 @@ state perl_bquot_string extends Highligh
   }
 }
 
+state perl_parens extends Highlight
+{
+    /\\\\./ {
+        language_print ($0);
+    }
+    /\)/ {
+        language_print ($0);
+        return;
+    }
+}
+
+
 state perl extends HighlightEntry
 {
   /* Comments. */
@@ -186,6 +199,12 @@ state perl extends HighlightEntry
     language_print ($0);
     call (perl_pod);
   }
+
+  /* parentheses */
+  /\(/ {
+      language_print ($0);
+      call (perl_parens);
+  }
 }