]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/ruby.micro
adding hexidecimal numbers to the existing C syntax rules
[micro.git] / runtime / syntax / ruby.micro
index 53947bea457e11685dabd1d87b5c694e6e8c649b..53ab3d3bd7a664b443cb8bb7a1951dcf4d794e0b 100644 (file)
@@ -1,12 +1,13 @@
 ## Here is an example for Ruby.
 ##
-syntax "Ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
+syntax "ruby" "\.rb$" "Gemfile" "config.ru" "Rakefile" "Capfile" "Vagrantfile"
 header "^#!.*/(env +)?ruby( |$)"
 
 ## Asciibetical list of reserved words
 color statement "\b(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"
 ## Constants
 color constant "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
+color constant.number "\b[0-9]+\b"
 ## Ruby "symbols"
 color constant (i) "([         ]|^):[0-9A-Z_]+\b"
 ## Some unique things we want to stand out
@@ -15,14 +16,14 @@ color constant "\b(__FILE__|__LINE__)\b"
 color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
 ## Shell command expansion is in `backticks` or like %x{this}.  These are
 ## "double-quotish" (to use a perlism).
-color constant "`[^`]*`" "%x\{[^}]*\}"
+color constant.string "`[^`]*`" "%x\{[^}]*\}"
 ## Strings, double-quoted
-color constant ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
+color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
 ## Expression substitution.  These go inside double-quoted strings,
 ## "like #{this}".
 color special "#\{[^}]*\}"
 ## Strings, single-quoted
-color constant "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
+color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
 ## Comments
 color comment "#[^{].*$" "#$"
 color comment "##[^{].*$" "##$"