2011-07-31 16:29:37 +02:00
|
|
|
# JOE syntax highlight file for Ruby
|
|
|
|
|
|
|
|
# Oh No! It's another perl!
|
|
|
|
|
|
|
|
# <<EOF1, <<EOF2 is not working. Only EOF1 is seen. It should wait for the
|
|
|
|
# EOF2.
|
|
|
|
|
|
|
|
=Idle
|
2011-08-02 18:52:46 +02:00
|
|
|
=Comment green
|
|
|
|
=CommentLabel bold green
|
|
|
|
=POD green
|
|
|
|
=Constant cyan
|
|
|
|
=Escape bold cyan
|
|
|
|
=Type bold
|
|
|
|
=Keyword bold
|
|
|
|
=Bad bold red
|
|
|
|
=Var yellow
|
|
|
|
=Brace magenta
|
|
|
|
|
|
|
|
=Symbol red
|
2011-09-29 16:16:46 +02:00
|
|
|
=SymbolEscape bold red
|
2011-08-02 18:52:46 +02:00
|
|
|
=ProcArg #yellow
|
|
|
|
=ClassMember fg_310 # brown
|
2011-09-14 11:27:40 +02:00
|
|
|
=GlobalVar yellow
|
2011-09-17 20:37:53 +02:00
|
|
|
=ClassDecl bold blue
|
2011-07-31 16:50:38 +02:00
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
# Detect pod
|
|
|
|
|
2011-10-04 23:27:38 +02:00
|
|
|
:pre_idle Idle
|
2011-10-04 21:26:20 +02:00
|
|
|
* NULL noeat call=.ruby()
|
2011-10-04 23:27:38 +02:00
|
|
|
|
|
|
|
.subr ruby
|
|
|
|
|
|
|
|
:idle Idle
|
|
|
|
* rest noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"=" pod_start
|
|
|
|
|
|
|
|
# Rest of line
|
|
|
|
|
|
|
|
:rest Idle
|
|
|
|
* rest
|
2011-08-02 18:52:46 +02:00
|
|
|
"#" line_comment recolor=-1
|
2011-10-19 20:34:20 +02:00
|
|
|
.ifdef haml
|
|
|
|
"\n" NULL return
|
|
|
|
.else
|
2011-07-31 16:29:37 +02:00
|
|
|
"\n" idle
|
2011-10-19 20:34:20 +02:00
|
|
|
.endif
|
2011-08-01 10:41:02 +02:00
|
|
|
"{}" brace recolor=-1
|
2011-07-31 16:29:37 +02:00
|
|
|
"0" first_digit recolor=-1
|
2011-08-01 11:21:59 +02:00
|
|
|
"1-9" decimal recolor=-1
|
2011-09-18 23:40:34 +02:00
|
|
|
"." ident_no_kw
|
2011-07-31 16:29:37 +02:00
|
|
|
"\"" string recolor=-1
|
|
|
|
"'" char recolor=-1
|
|
|
|
"`" backtick recolor=-1
|
|
|
|
"/" regex recolor=-1
|
|
|
|
"<" maybe_inc
|
|
|
|
"$" not_string buffer
|
|
|
|
"%" pstring
|
|
|
|
"a-zA-Z_" ident buffer
|
|
|
|
|
2011-08-01 10:32:23 +02:00
|
|
|
# higher level, ruby specific
|
2011-09-18 16:35:32 +02:00
|
|
|
":" maybe_symbol
|
2012-03-31 20:43:37 +02:00
|
|
|
# "|" proc_arg
|
2011-07-31 22:55:29 +02:00
|
|
|
"@" class_member1
|
2011-07-31 16:50:38 +02:00
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
# / / regex not allowed after terms
|
|
|
|
|
|
|
|
:after_term Idle
|
2011-08-06 12:29:43 +02:00
|
|
|
* rest noeat
|
|
|
|
" \t)" after_term
|
2011-10-04 21:26:20 +02:00
|
|
|
.ifdef erb
|
|
|
|
"/" rest
|
|
|
|
"%" after_term_erb_end
|
|
|
|
.else
|
2011-07-31 16:29:37 +02:00
|
|
|
"/%" rest
|
2011-10-04 21:26:20 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
:after_term_erb_end Idle
|
|
|
|
* rest noeat
|
|
|
|
">" NULL recolor=-2 return
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:pod_start Idle
|
|
|
|
* pod_start
|
|
|
|
"\n" pod_block
|
|
|
|
|
|
|
|
:pod_block POD
|
|
|
|
* pod_block
|
|
|
|
"=" pod_ident buffer
|
|
|
|
|
|
|
|
:pod_ident POD
|
|
|
|
* pod_block noeat strings
|
|
|
|
"=end" rest
|
|
|
|
done
|
|
|
|
"a-zA-Z0-9_" pod_ident
|
|
|
|
|
|
|
|
:maybe_inc Idle
|
2011-08-06 12:29:43 +02:00
|
|
|
* after_term noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"<" maybe_inc1
|
|
|
|
|
|
|
|
:maybe_inc1 Idle
|
2011-08-06 12:29:43 +02:00
|
|
|
* after_term noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"-" allow_space
|
|
|
|
"'\"" quoted_inc_start save_c recolor=-1
|
|
|
|
"A-Za-z_" inc buffer noeat
|
|
|
|
|
|
|
|
:allow_space Idle
|
2011-08-06 12:29:43 +02:00
|
|
|
* after_term noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"'\"" quoted_inc_start_allow save_c recolor=-1
|
2011-08-06 12:29:43 +02:00
|
|
|
"A-Za-z_" inc_allow buffer noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:quoted_inc_start Var
|
|
|
|
* quoted_inc buffer
|
|
|
|
|
|
|
|
:quoted_inc_start_allow Var
|
|
|
|
* quoted_inc_allow buffer
|
|
|
|
|
|
|
|
:quoted_inc Var
|
|
|
|
* quoted_inc
|
|
|
|
& skipline save_s
|
|
|
|
|
|
|
|
:quoted_inc_allow Var
|
|
|
|
* quoted_inc_allow
|
|
|
|
& skipline_allow save_s
|
|
|
|
|
|
|
|
:inc Var
|
|
|
|
* skipline save_s noeat
|
|
|
|
"A-Za-z0-9_" inc
|
|
|
|
|
|
|
|
:inc_allow Var
|
|
|
|
* skipline_allow save_s noeat
|
|
|
|
"A-Za-z0-9_" inc_allow
|
|
|
|
|
|
|
|
# Should be treated as a normal line here...
|
|
|
|
|
|
|
|
:skipline Idle
|
|
|
|
* skipline
|
|
|
|
"\n" next_line
|
|
|
|
|
|
|
|
:skipline_allow Idle
|
|
|
|
* skipline_allow
|
|
|
|
"\n" next_line_allow
|
|
|
|
|
|
|
|
:todelim Constant
|
|
|
|
* todelim
|
|
|
|
"\n" next_line strings
|
|
|
|
"&" founddelim
|
|
|
|
done
|
|
|
|
|
|
|
|
:todelim_allow Constant
|
|
|
|
* todelim_allow
|
|
|
|
"\n" next_line_allow strings
|
|
|
|
"&" founddelim
|
|
|
|
done
|
|
|
|
|
|
|
|
# eat \n so it's not in string.
|
|
|
|
:next_line Constant
|
|
|
|
* todelim buffer
|
|
|
|
"\n" next_line
|
|
|
|
|
|
|
|
:next_line_allow Constant
|
|
|
|
* todelim_allow buffer
|
2011-08-06 12:29:43 +02:00
|
|
|
" \t\n" next_line_allow
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:founddelim Var
|
|
|
|
* idle noeat
|
|
|
|
|
|
|
|
:regex Constant
|
|
|
|
* regex
|
|
|
|
"\\" regex_quote recolor=-1
|
|
|
|
"/" after_term
|
|
|
|
|
|
|
|
:regex_quote Escape
|
|
|
|
* regex
|
|
|
|
|
|
|
|
:not_string Idle
|
2011-08-04 00:23:31 +02:00
|
|
|
* rest noeat
|
2012-07-20 12:04:07 +02:00
|
|
|
"a-zA-Z0-9_" global_var recolor=-2
|
2011-07-31 16:29:37 +02:00
|
|
|
"\"'`#/" rest
|
|
|
|
|
2011-08-01 10:32:23 +02:00
|
|
|
:brace Brace
|
2011-08-01 10:38:51 +02:00
|
|
|
* rest noeat
|
2011-08-01 10:32:23 +02:00
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
:line_comment Comment
|
|
|
|
* line_comment
|
2011-10-08 20:28:26 +02:00
|
|
|
.ifdef erb
|
|
|
|
"%" line_comment_maybe_erb_end
|
|
|
|
.endif
|
2011-08-02 18:52:46 +02:00
|
|
|
# might be TODO label
|
|
|
|
"BFHNTX" line_comment noeat call=.comment_todo()
|
2011-10-19 20:34:20 +02:00
|
|
|
.ifdef haml
|
|
|
|
"\n" NULL return
|
|
|
|
.else
|
2011-07-31 16:29:37 +02:00
|
|
|
"\n" idle
|
2011-10-19 20:34:20 +02:00
|
|
|
.endif
|
2011-07-31 16:29:37 +02:00
|
|
|
|
2011-10-08 20:28:26 +02:00
|
|
|
:line_comment_maybe_erb_end Comment
|
|
|
|
">" NULL recolor=-2 return
|
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
:end_of_file_comment Comment
|
|
|
|
* end_of_file_comment
|
|
|
|
|
|
|
|
:first_digit Constant
|
|
|
|
* after_term noeat
|
|
|
|
"x" hex
|
|
|
|
"b" binary
|
|
|
|
"." float
|
|
|
|
"eE" epart
|
|
|
|
"0-7" octal
|
|
|
|
"89" bad_number recolor=-1
|
|
|
|
|
|
|
|
:bad_number Bad
|
|
|
|
* after_term noeat
|
|
|
|
"0-9" bad_number
|
|
|
|
|
|
|
|
:octal Constant
|
|
|
|
* after_term noeat
|
|
|
|
"0-7_" octal
|
|
|
|
"89" bad_number recolor=-1
|
|
|
|
|
|
|
|
:binary Constant
|
|
|
|
* after_term noeat
|
|
|
|
"01_" binary
|
|
|
|
"2-9" bad_number recolor=-1
|
|
|
|
|
|
|
|
:hex Constant
|
|
|
|
* after_term noeat
|
|
|
|
"0-9A-Fa-f_" hex
|
|
|
|
|
|
|
|
:decimal Constant
|
|
|
|
* after_term noeat
|
|
|
|
"0-9_" decimal
|
|
|
|
"eE" epart
|
|
|
|
"." float
|
|
|
|
|
|
|
|
:float Constant
|
|
|
|
* after_term noeat
|
|
|
|
"eE" epart
|
|
|
|
"0-9_" float
|
|
|
|
|
|
|
|
:epart Constant
|
|
|
|
* after_term noeat
|
|
|
|
"0-9+\-" enum
|
|
|
|
|
|
|
|
:enum Constant
|
|
|
|
* after_term noeat
|
|
|
|
"0-9_" enum
|
|
|
|
|
|
|
|
:string Constant
|
|
|
|
* string
|
|
|
|
"\"" after_term
|
|
|
|
"\\" string_escape recolor=-1
|
2011-08-02 15:16:22 +02:00
|
|
|
"#" maybe_string_subst recolor=-1
|
2011-07-31 16:29:37 +02:00
|
|
|
|
2011-08-02 15:16:22 +02:00
|
|
|
:maybe_string_subst Constant
|
2011-10-12 14:00:13 +02:00
|
|
|
* string noeat
|
2011-08-02 15:16:22 +02:00
|
|
|
"{" string_subst recolor=-2
|
2011-07-31 16:29:37 +02:00
|
|
|
|
2011-08-02 15:16:22 +02:00
|
|
|
:string_subst Escape
|
|
|
|
* string_subst
|
|
|
|
"}" string
|
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
:string_escape Escape
|
|
|
|
* string
|
|
|
|
"x" string_hex1
|
|
|
|
"c" string_ctrl
|
|
|
|
"N" string_named
|
|
|
|
"0-7" string_octal2
|
|
|
|
"\n" string recolor=-2
|
|
|
|
|
|
|
|
:string_named Escape
|
|
|
|
* string
|
|
|
|
"{" string_named_rest
|
|
|
|
|
|
|
|
:string_named_rest Escape
|
|
|
|
* string_named_rest
|
|
|
|
"}" string
|
|
|
|
|
|
|
|
:string_ctrl Escape
|
|
|
|
* string
|
|
|
|
|
|
|
|
:string_hex1 Escape
|
|
|
|
* string noeat
|
|
|
|
"{" string_unicode
|
|
|
|
"0-9a-fA-F" string_hex2
|
|
|
|
|
|
|
|
:string_unicode Escape
|
|
|
|
* string_unicode
|
|
|
|
"}" string
|
|
|
|
|
|
|
|
:string_hex2 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-9a-fA-F" string
|
|
|
|
|
|
|
|
:string_octal2 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-7" string_octal3
|
|
|
|
|
|
|
|
:string_octal3 Escape
|
|
|
|
* string noeat
|
|
|
|
"0-7" string
|
|
|
|
|
|
|
|
# Only \\ and \' allowed in single quoted strings
|
|
|
|
|
|
|
|
:char Constant
|
|
|
|
* char
|
|
|
|
"\n" reset
|
|
|
|
"'" after_term
|
|
|
|
"\\" char_escape recolor=-1
|
|
|
|
|
|
|
|
:char_escape Escape
|
|
|
|
* char recolor=-2
|
|
|
|
"\\'" char
|
|
|
|
|
|
|
|
:backtick Constant
|
|
|
|
* backtick
|
|
|
|
"`" after_term
|
|
|
|
"\\" backtick_escape recolor=-1
|
2011-08-06 12:29:43 +02:00
|
|
|
"$@" backtick_subst recolor=-1
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:backtick_subst Escape
|
|
|
|
* backtick noeat recolor=-1
|
|
|
|
"a-zA-Z_0-9" backtick_subst
|
|
|
|
|
|
|
|
:backtick_escape Escape
|
|
|
|
* backtick
|
|
|
|
"x" backtick_hex1
|
|
|
|
"c" backtick_ctrl
|
|
|
|
"N" backtick_named
|
|
|
|
"0-7" backtick_octal2
|
2011-08-06 12:29:43 +02:00
|
|
|
"\n" backtick recolor=-2
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:backtick_named Escape
|
|
|
|
* backtick
|
|
|
|
"{" backtick_named_rest
|
|
|
|
|
|
|
|
:backtick_named_rest Escape
|
|
|
|
* backtick_named_rest
|
|
|
|
"}" backtick
|
|
|
|
|
|
|
|
:backtick_ctrl Escape
|
|
|
|
* backtick
|
|
|
|
|
|
|
|
:backtick_hex1 Escape
|
2011-08-06 12:29:43 +02:00
|
|
|
* backtick noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"{" backtick_unicode
|
|
|
|
"0-9a-fA-F" backtick_hex2
|
|
|
|
|
|
|
|
:backtick_unicode Escape
|
|
|
|
* backtick_unicode
|
|
|
|
"}" backtick
|
|
|
|
|
|
|
|
:backtick_hex2 Escape
|
2011-08-06 12:29:43 +02:00
|
|
|
* backtick noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"0-9a-fA-F" backtick
|
|
|
|
|
|
|
|
:backtick_octal2 Escape
|
2011-08-06 12:29:43 +02:00
|
|
|
* backtick noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"0-7" backtick_octal3
|
|
|
|
|
|
|
|
:backtick_octal3 Escape
|
2011-08-06 12:29:43 +02:00
|
|
|
* backtick noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
"0-7" backtick
|
|
|
|
|
2011-09-18 23:40:34 +02:00
|
|
|
:ident_no_kw Idle
|
|
|
|
* after_term noeat
|
2011-09-19 00:42:28 +02:00
|
|
|
"0" first_digit recolor=-1
|
|
|
|
"1-9" decimal recolor=-1
|
|
|
|
"a-zA-Z_" ident_no_kw1
|
|
|
|
|
|
|
|
:ident_no_kw1 Idle
|
|
|
|
* after_term noeat
|
|
|
|
"a-zA-Z0-9_?!" ident_no_kw1
|
2011-09-18 23:40:34 +02:00
|
|
|
|
2011-11-06 16:14:14 +01:00
|
|
|
:ident Idle
|
2011-07-31 16:29:37 +02:00
|
|
|
* after_term noeat strings
|
|
|
|
"BEGIN" kw
|
|
|
|
"END" kw
|
|
|
|
"alias" kw
|
|
|
|
"and" kw
|
|
|
|
"begin" kw
|
|
|
|
"break" kw
|
|
|
|
"case" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"catch" kw
|
2011-09-17 20:37:53 +02:00
|
|
|
"class" kw_class
|
2011-07-31 16:29:37 +02:00
|
|
|
"def" kw
|
|
|
|
"defined" kw
|
|
|
|
"do" kw
|
|
|
|
"else" kw
|
|
|
|
"elsif" kw
|
|
|
|
"end" kw
|
|
|
|
"ensure" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"fail" kw
|
2011-07-31 16:29:37 +02:00
|
|
|
"false" kw
|
|
|
|
"for" kw
|
|
|
|
"if" kw
|
|
|
|
"in" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"lambda" kw
|
2011-07-31 16:29:37 +02:00
|
|
|
"module" kw
|
|
|
|
"next" kw
|
|
|
|
"nil" kw
|
|
|
|
"not" kw
|
|
|
|
"or" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"private" kw
|
|
|
|
"proc" kw
|
|
|
|
"protected" kw
|
|
|
|
"public" kw
|
|
|
|
"raise" kw
|
2011-07-31 16:29:37 +02:00
|
|
|
"redo" kw
|
|
|
|
"rescue" kw
|
|
|
|
"retry" kw
|
|
|
|
"return" kw
|
|
|
|
"self" kw
|
|
|
|
"super" kw
|
|
|
|
"then" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"throw" kw
|
2011-07-31 16:29:37 +02:00
|
|
|
"true" kw
|
|
|
|
"undef" kw
|
|
|
|
"unless" kw
|
|
|
|
"until" kw
|
|
|
|
"when" kw
|
|
|
|
"while" kw
|
|
|
|
"yield" kw
|
2011-07-31 16:50:38 +02:00
|
|
|
# quasi-keywords (Module or Kernel methods)
|
|
|
|
"require" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"autoload" kw
|
|
|
|
"extend" kw
|
2011-07-31 16:50:38 +02:00
|
|
|
"include" kw
|
|
|
|
"puts" kw
|
|
|
|
"exit" kw
|
|
|
|
"attr_accessor" kw
|
|
|
|
"attr_reader" kw
|
|
|
|
"attr_writer" kw
|
2011-08-11 22:41:01 +02:00
|
|
|
"module_function" kw
|
2011-07-31 16:29:37 +02:00
|
|
|
done
|
2011-08-11 22:53:32 +02:00
|
|
|
# allowing ?! is not nearly correct but fixes more than
|
|
|
|
# it destructs
|
|
|
|
"a-zA-Z0-9_?!" ident
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:kw Keyword
|
2011-08-06 12:29:43 +02:00
|
|
|
* rest noeat
|
2011-07-31 16:29:37 +02:00
|
|
|
|
2011-09-17 20:37:53 +02:00
|
|
|
:kw_class Keyword
|
|
|
|
* rest noeat
|
|
|
|
" \t\n" kw_class_space
|
|
|
|
|
|
|
|
:kw_class_space Idle
|
|
|
|
* rest noeat
|
|
|
|
# first char should be uppercase letter
|
2011-09-18 16:30:00 +02:00
|
|
|
"a-zA-Z_" kw_class_decl noeat
|
|
|
|
" \t\n" kw_class_space
|
2011-09-17 20:37:53 +02:00
|
|
|
|
|
|
|
:kw_class_decl ClassDecl
|
|
|
|
* rest noeat
|
|
|
|
"a-zA-Z0-9_" kw_class_decl
|
|
|
|
|
2011-07-31 16:29:37 +02:00
|
|
|
:pstring Idle
|
2011-08-06 12:29:43 +02:00
|
|
|
* match noeat
|
|
|
|
" \t" after_term noeat
|
2012-01-19 12:04:13 +01:00
|
|
|
"xrqQwW" match
|
2011-10-04 21:26:20 +02:00
|
|
|
.ifdef erb
|
|
|
|
">" NULL recolor=-2 return
|
|
|
|
.endif
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:match Idle
|
|
|
|
* inmatch save_c recolor=-1
|
2011-08-06 12:29:43 +02:00
|
|
|
" \t" match
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:inmatch Constant
|
|
|
|
* inmatch
|
|
|
|
& after_term
|
|
|
|
"\\" inmatch_quote recolor=-1
|
|
|
|
|
|
|
|
:inmatch_quote Escape
|
|
|
|
* inmatch
|
|
|
|
|
|
|
|
:subst Idle
|
|
|
|
* insubst save_c recolor=-1
|
|
|
|
"<([{`" delim_insubst save_c recolor=-1
|
2011-08-06 12:29:43 +02:00
|
|
|
" \t" subst
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:insubst Constant
|
|
|
|
* insubst
|
|
|
|
& inrepl
|
|
|
|
"\\" insubst_quote recolor=-1
|
|
|
|
|
|
|
|
:insubst_quote Escape
|
|
|
|
* insubst
|
|
|
|
|
|
|
|
:inrepl Constant
|
|
|
|
* inrepl
|
|
|
|
& after_term
|
|
|
|
"\\" inrepl_quote
|
|
|
|
|
|
|
|
:inrepl_quote Escape
|
|
|
|
* inrepl
|
|
|
|
|
|
|
|
:delim_insubst Constant
|
|
|
|
* delim_insubst
|
|
|
|
& delim_repl
|
|
|
|
"\\" delim_quote
|
|
|
|
|
|
|
|
:delim_quote Escape
|
|
|
|
* delim_insubst
|
|
|
|
|
|
|
|
:delim_repl Constant
|
|
|
|
* repl save_c recolor=-1
|
2011-08-06 12:29:43 +02:00
|
|
|
" \t" delim_repl
|
2011-07-31 16:29:37 +02:00
|
|
|
|
|
|
|
:repl Constant
|
|
|
|
* repl
|
|
|
|
& after_term
|
|
|
|
"\\" repl_quote
|
|
|
|
|
|
|
|
:repl_quote Escape
|
|
|
|
* repl
|
2011-07-31 16:50:38 +02:00
|
|
|
|
|
|
|
:maybe_symbol Idle
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
2011-07-31 16:50:38 +02:00
|
|
|
# prevent wrong Module::Member detection
|
2011-08-01 11:21:59 +02:00
|
|
|
":" rest
|
2011-07-31 16:50:38 +02:00
|
|
|
# first char mustn't be 0-9
|
2011-09-18 16:35:32 +02:00
|
|
|
"a-zA-Z_" symbol recolor=-2
|
2011-09-29 16:16:46 +02:00
|
|
|
"\"" symbol_str recolor=-2
|
|
|
|
"'" symbol_str_sq recolor=-2
|
2011-07-31 16:50:38 +02:00
|
|
|
|
|
|
|
:symbol Symbol
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
2011-10-03 23:01:33 +02:00
|
|
|
"a-zA-Z0-9_?!" symbol
|
2011-07-31 16:50:38 +02:00
|
|
|
|
2011-09-29 16:16:46 +02:00
|
|
|
:symbol_str Symbol
|
|
|
|
* symbol_str
|
|
|
|
"\"" after_term
|
|
|
|
"#" symbol_maybe_str_subst recolor=-1
|
|
|
|
|
|
|
|
:symbol_maybe_str_subst Symbol
|
|
|
|
* symbol_str
|
|
|
|
"{" symbol_str_subst recolor=-2
|
|
|
|
|
|
|
|
:symbol_str_subst SymbolEscape
|
|
|
|
* symbol_str_subst
|
|
|
|
"}" symbol_str
|
|
|
|
|
|
|
|
:symbol_str_sq Symbol
|
|
|
|
* symbol_str_sq
|
|
|
|
"'" after_term
|
|
|
|
|
2011-07-31 22:55:29 +02:00
|
|
|
:proc_arg ProcArg
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
|
|
|
"," proc_arg_sep noeat
|
2011-07-31 16:50:38 +02:00
|
|
|
"a-zA-Z_" proc_arg
|
|
|
|
|
2011-07-31 22:55:29 +02:00
|
|
|
:proc_arg_sep Idle
|
2011-07-31 16:50:38 +02:00
|
|
|
* proc_arg
|
|
|
|
|
2011-07-31 22:55:29 +02:00
|
|
|
:class_member1 Idle
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
2011-07-31 22:55:29 +02:00
|
|
|
"a-zA-Z_" class_member recolor=-2
|
|
|
|
"@" class_member2
|
|
|
|
|
|
|
|
:class_member2 ClassMember
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
2011-07-31 22:55:29 +02:00
|
|
|
"a-zA-Z_" class_member recolor=-3
|
|
|
|
|
|
|
|
:class_member ClassMember
|
2011-08-01 11:21:59 +02:00
|
|
|
* rest noeat
|
2011-07-31 16:50:38 +02:00
|
|
|
"a-zA-Z0-9_" class_member
|
2011-08-02 18:52:46 +02:00
|
|
|
|
2011-08-04 00:23:31 +02:00
|
|
|
:global_var GlobalVar
|
|
|
|
* rest noeat
|
|
|
|
"a-zA-Z0-9_" global_var
|
|
|
|
|
2011-10-04 21:26:20 +02:00
|
|
|
.end
|
|
|
|
|
2011-08-02 18:52:46 +02:00
|
|
|
.subr comment_todo
|
|
|
|
# initial state
|
|
|
|
:comment_todo_init Comment
|
|
|
|
* comment_todo_guess buffer
|
|
|
|
|
|
|
|
# highlight common TODO labels
|
|
|
|
:comment_todo_guess Comment
|
|
|
|
* comment_todo_unknown noeat strings
|
|
|
|
"BUG" comment_todo
|
|
|
|
"FIXME" comment_todo
|
|
|
|
"HACK" comment_todo
|
|
|
|
"NOTE" comment_todo
|
|
|
|
"TODO" comment_todo
|
|
|
|
"XXX" comment_todo
|
|
|
|
done
|
|
|
|
"A-Z" comment_todo_guess
|
|
|
|
|
|
|
|
:comment_todo_unknown Comment
|
|
|
|
* NULL noeat return
|
|
|
|
|
|
|
|
:comment_todo CommentLabel
|
|
|
|
* NULL noeat return
|
|
|
|
.end
|