[hackers] [sandy] Ruby syntax highlighting || Rafael Garcia

From: <hg_AT_suckless.org>
Date: Sat, 10 Dec 2011 17:20:46 +0100 (CET)

changeset: 106:44a009346982
tag: tip
user: Rafael Garcia <rafael.garcia.gallego_AT_gmail.com>
date: Sat Dec 10 17:20:43 2011 +0100
files: config.def.h
description:
Ruby syntax highlighting


diff -r 6bf0d790afa8 -r 44a009346982 config.def.h
--- a/config.def.h Sat Nov 26 13:32:35 2011 +0100
+++ b/config.def.h Sat Dec 10 17:20:43 2011 +0100
_AT_@ -248,7 +248,7 @@
         } },
 
 {"vala", "\\.(vapi|vala)$", {
- /* HiRed */ B"[A-Z_][0-9A-Z_]+\\>",
+ /* HiRed */ B"[A-Z_][0-9A-Z_]+"B,
         /* HiGreen */ B"(for|if|while|do|else|case|default|switch|get|set|value|out|ref|enum)"B,
         /* LoGreen */ B"(uint|uint8|uint16|uint32|uint64|bool|byte|ssize_t|size_t|char|double|string|float|int|long|short|this|base|transient|void|true|false|null|unowned|owned)"B,
         /* HiMag */ B"(try|catch|throw|finally|continue|break|return|new|sizeof|signal|delegate)"B,
_AT_@ -258,7 +258,7 @@
         /* LoBlue */ "(//.*|/\\*([^*]|\\*[^/])*\\*/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)",
         } },
 {"java", "\\.java$", {
- /* HiRed */ B"[A-Z_][0-9A-Z_]+\\>",
+ /* HiRed */ B"[A-Z_][0-9A-Z_]+"B,
         /* HiGreen */ B"(for|if|while|do|else|case|default|switch)"B,
         /* LoGreen */ B"(boolean|byte|char|double|float|int|long|short|transient|void|true|false|null)"B,
         /* HiMag */ B"(try|catch|throw|finally|continue|break|return|new)"B,
_AT_@ -267,6 +267,16 @@
         /* LoRed */ "\"(\\\\.|[^\"])*\"",
         /* LoBlue */ "(//.*|/\\*([^*]|\\*[^/])*\\*/|/\\*([^*]|\\*[^/])*$|^([^/]|/[^*])*\\*/)",
         } },
+{"ruby", "\\.rb$", {
+ /* HiRed */ "(\\$|_AT_|@@)?"B"[A-Z]+[0-9A-Z_a-z]*",
+ /* HiGreen */ B"(__FILE__|__LINE__|BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)"B,
+ /* LoGreen */ "([ ]|^):[0-9A-Z_]+"B,
+ /* HiMag */ "(/([^/]|(\\/))*/[iomx]*|%r\\{([^}]|(\\}))*\\}[iomx]*)",
+ /* LoMag */ "(`[^`]*`|%x\\{[^}]*\\})",
+ /* HiBlue */ "(\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!|\'([^\']|(\\\\\'))*\'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!)",
+ /* LoRed */ "#\\{[^}]*\\}",
+ /* LoBlue */ "(#[^{].*$|#$)",
+ } },
 #else /* HILIGHT_SYNTAX */
 {"", "\0", { "\0", "\0", "\0", "\0", "\0", "\0", "\0", "\0" } }
 #endif /* HILIGHT_SYNTAX */
Received on Sat Dec 10 2011 - 17:20:46 CET

This archive was generated by hypermail 2.3.0 : Sat Dec 10 2011 - 17:24:05 CET