forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruby.yaml
26 lines (23 loc) · 1.24 KB
/
ruby.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
filetype: ruby
detect:
filename: "\\.rb$|\\.gemspec$|Gemfile|config.ru|Rakefile|Capfile|Vagrantfile"
header: "^#!.*/(env +)?ruby( |$)"
rules:
- 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"
- constant: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
- constant.number: "\\b[0-9]+\\b"
- constant: "(i?)([ ]|^):[0-9A-Z_]+\\b"
- constant: "\\b(__FILE__|__LINE__)\\b"
- constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"
- constant.string: "`[^`]*`|%x\\{[^}]*\\}"
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
- special: "#\\{[^}]*\\}"
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
- comment: "#[^{].*$|#$"
- comment.bright: "##[^{].*$|##$"
- constant.macro:
start: "<<-?'?EOT'?"
end: "^EOT"
rules: []
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"
- preproc.shebang: "^#!.+?( |$)"