Highlight (postfix) modifiers in Ruby.

This commit is contained in:
Pistos 2009-02-17 20:58:40 -05:00
parent 9e91a627b4
commit 3886ab9ff1
2 changed files with 6 additions and 1 deletions

View file

@ -7,6 +7,7 @@ colour 37 111 17 # single-quoted strings; light blue on dark blue
colour 38 117 18 # double-quoted strings; light blue on dark blue
colour 39 213 90 # shell-quoted strings; light purple on purple
colour 40 15 234 # constants; white on light black
colour 44 224 88 # Ruby modifiers; light red on dark red
colour 41 15 233 # XML nodes; white on light black
colour 42 45 233 # XML attributes; light blue on black

View file

@ -625,8 +625,12 @@ lang.ruby.bangmask #!.*ruby
lang.ruby.format.default white bold
lang.ruby.format.selection inverse
lang.ruby.format.found yellow inverse
lang.ruby.tokens.reserved_words \b(__FILE__|and|def|end|in|or|self|unless|__LINE__|begin|defined\?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|class|elsif|if|not|return|undef|yield)\b
lang.ruby.tokens.reserved_words \b(__FILE__|and|def|end|in|or|self|__LINE__|begin|defined\?|ensure|module|redo|super|until|BEGIN|break|do|false|next|rescue|then|when|END|case|else|for|nil|retry|true|while|alias|class|elsif|not|return|undef|yield)\b
lang.ruby.tokens.reserved_words.format white
lang.ruby.tokens.non_modifiers ^\s*(if|unless)
lang.ruby.tokens.non_modifiers.format white
lang.ruby.tokens.modifiers \s+(if|unless)
lang.ruby.tokens.modifiers.format 44
lang.ruby.tokens.constants \b([A-Z_]+|[A-Z_][A-Z0-9_]+)\b
lang.ruby.tokens.constants.format yellow bold
lang.ruby.tokens.symbols [^:](:[a-zA-Z_][a-zA-Z_0-9]*)