ultraviolet1x 0.12.2 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. data/Gemfile +1 -1
  2. data/Gemfile.lock +2 -2
  3. data/README.rdoc +1 -6
  4. data/lib/uv.rb +1 -1
  5. data/lib/uv/version.rb +1 -1
  6. data/spec/ultraviolet_spec.rb +0 -9
  7. metadata +52 -195
  8. data/syntax/actionscript.syntax +0 -97
  9. data/syntax/active4d.syntax +0 -276
  10. data/syntax/active4d_html.syntax +0 -311
  11. data/syntax/active4d_ini.syntax +0 -50
  12. data/syntax/active4d_library.syntax +0 -21
  13. data/syntax/ada.syntax +0 -33
  14. data/syntax/antlr.syntax +0 -151
  15. data/syntax/apache.syntax +0 -191
  16. data/syntax/applescript.syntax +0 -384
  17. data/syntax/asp.syntax +0 -70
  18. data/syntax/asp_vb.net.syntax +0 -129
  19. data/syntax/bibtex.syntax +0 -151
  20. data/syntax/blog_html.syntax +0 -41
  21. data/syntax/blog_markdown.syntax +0 -42
  22. data/syntax/blog_text.syntax +0 -27
  23. data/syntax/blog_textile.syntax +0 -27
  24. data/syntax/broken/markdown.syntax +0 -543
  25. data/syntax/broken/php.syntax +0 -1253
  26. data/syntax/buggy/nemerle.syntax +0 -74
  27. data/syntax/build.syntax +0 -53
  28. data/syntax/bulletin_board.syntax +0 -287
  29. data/syntax/c++.syntax +0 -186
  30. data/syntax/c.syntax +0 -414
  31. data/syntax/cake.syntax +0 -55
  32. data/syntax/camlp4.syntax +0 -36
  33. data/syntax/cm.syntax +0 -32
  34. data/syntax/coffeescript.syntax +0 -216
  35. data/syntax/coldfusion.syntax +0 -119
  36. data/syntax/context_free.syntax +0 -176
  37. data/syntax/cs.syntax +0 -59
  38. data/syntax/css.syntax +0 -195
  39. data/syntax/css_experimental.syntax +0 -1925
  40. data/syntax/csv.syntax +0 -68
  41. data/syntax/d.syntax +0 -142
  42. data/syntax/diff.syntax +0 -81
  43. data/syntax/dokuwiki.syntax +0 -204
  44. data/syntax/dot.syntax +0 -47
  45. data/syntax/doxygen.syntax +0 -43
  46. data/syntax/dylan.syntax +0 -62
  47. data/syntax/eiffel.syntax +0 -78
  48. data/syntax/erlang.syntax +0 -922
  49. data/syntax/f-script.syntax +0 -80
  50. data/syntax/fortran.syntax +0 -141
  51. data/syntax/fxscript.syntax +0 -142
  52. data/syntax/greasemonkey.syntax +0 -34
  53. data/syntax/gri.syntax +0 -83
  54. data/syntax/groovy.syntax +0 -191
  55. data/syntax/gtd.syntax +0 -22
  56. data/syntax/gtdalt.syntax +0 -143
  57. data/syntax/haml.syntax +0 -88
  58. data/syntax/haskell.syntax +0 -88
  59. data/syntax/html-asp.syntax +0 -27
  60. data/syntax/html.syntax +0 -362
  61. data/syntax/html_django.syntax +0 -36
  62. data/syntax/html_for_asp.net.syntax +0 -424
  63. data/syntax/html_mason.syntax +0 -119
  64. data/syntax/html_rails.syntax +0 -40
  65. data/syntax/html_tcl.syntax +0 -26
  66. data/syntax/icalendar.syntax +0 -32
  67. data/syntax/inform.syntax +0 -48
  68. data/syntax/ini.syntax +0 -55
  69. data/syntax/installer_distribution_script.syntax +0 -77
  70. data/syntax/io.syntax +0 -81
  71. data/syntax/java.syntax +0 -211
  72. data/syntax/javaproperties.syntax +0 -20
  73. data/syntax/javascript.syntax +0 -256
  74. data/syntax/javascript_+_prototype.syntax +0 -72
  75. data/syntax/javascript_+_prototype_bracketed.syntax +0 -140
  76. data/syntax/jquery_javascript.syntax +0 -114
  77. data/syntax/json.syntax +0 -136
  78. data/syntax/languagedefinition.syntax +0 -708
  79. data/syntax/latex.syntax +0 -566
  80. data/syntax/latex_beamer.syntax +0 -41
  81. data/syntax/latex_log.syntax +0 -50
  82. data/syntax/latex_memoir.syntax +0 -64
  83. data/syntax/lexflex.syntax +0 -219
  84. data/syntax/lighttpd.syntax +0 -54
  85. data/syntax/lilypond.syntax +0 -492
  86. data/syntax/lisp.syntax +0 -61
  87. data/syntax/literate_haskell.syntax +0 -24
  88. data/syntax/logo.syntax +0 -29
  89. data/syntax/logtalk.syntax +0 -152
  90. data/syntax/lua.syntax +0 -86
  91. data/syntax/m.syntax +0 -142
  92. data/syntax/macports_portfile.syntax +0 -163
  93. data/syntax/mail.syntax +0 -118
  94. data/syntax/makefile.syntax +0 -36
  95. data/syntax/man.syntax +0 -17
  96. data/syntax/mediawiki.syntax +0 -567
  97. data/syntax/mel.syntax +0 -92
  98. data/syntax/mips.syntax +0 -66
  99. data/syntax/mod_perl.syntax +0 -50
  100. data/syntax/modula-3.syntax +0 -47
  101. data/syntax/moinmoin.syntax +0 -189
  102. data/syntax/mootools.syntax +0 -572
  103. data/syntax/movable_type.syntax +0 -162
  104. data/syntax/multimarkdown.syntax +0 -39
  105. data/syntax/objective-c++.syntax +0 -18
  106. data/syntax/objective-c.syntax +0 -233
  107. data/syntax/ocaml.syntax +0 -764
  108. data/syntax/ocamllex.syntax +0 -167
  109. data/syntax/ocamlyacc.syntax +0 -184
  110. data/syntax/old/YAML.yaml +0 -160
  111. data/syntax/old/txt2tags.yaml +0 -139
  112. data/syntax/opengl.syntax +0 -14
  113. data/syntax/pascal.syntax +0 -77
  114. data/syntax/perl.syntax +0 -1113
  115. data/syntax/plain_text.syntax +0 -32
  116. data/syntax/pmwiki.syntax +0 -113
  117. data/syntax/postscript.syntax +0 -114
  118. data/syntax/processing.syntax +0 -106
  119. data/syntax/prolog.syntax +0 -40
  120. data/syntax/property_list.syntax +0 -635
  121. data/syntax/python.syntax +0 -868
  122. data/syntax/python_django.syntax +0 -21
  123. data/syntax/qmake_project.syntax +0 -114
  124. data/syntax/qt_c++.syntax +0 -26
  125. data/syntax/quake3_config.syntax +0 -32
  126. data/syntax/r.syntax +0 -81
  127. data/syntax/r_console.syntax +0 -16
  128. data/syntax/ragel.syntax +0 -201
  129. data/syntax/rd_r_documentation.syntax +0 -91
  130. data/syntax/regexp.syntax +0 -50
  131. data/syntax/regular_expressions_oniguruma.syntax +0 -107
  132. data/syntax/regular_expressions_python.syntax +0 -109
  133. data/syntax/release_notes.syntax +0 -46
  134. data/syntax/remind.syntax +0 -253
  135. data/syntax/restructuredtext.syntax +0 -250
  136. data/syntax/rez.syntax +0 -80
  137. data/syntax/ruby.syntax +0 -1035
  138. data/syntax/ruby_experimental.syntax +0 -145
  139. data/syntax/ruby_on_rails.syntax +0 -88
  140. data/syntax/s5.syntax +0 -69
  141. data/syntax/sass.syntax +0 -45
  142. data/syntax/scheme.syntax +0 -347
  143. data/syntax/scilab.syntax +0 -41
  144. data/syntax/setext.syntax +0 -147
  145. data/syntax/shell-unix-generic.syntax +0 -384
  146. data/syntax/slate.syntax +0 -149
  147. data/syntax/smarty.syntax +0 -63
  148. data/syntax/sql.syntax +0 -237
  149. data/syntax/sql_rails.syntax +0 -18
  150. data/syntax/ssh-config.syntax +0 -33
  151. data/syntax/standard_ml.syntax +0 -121
  152. data/syntax/strings_file.syntax +0 -39
  153. data/syntax/subversion_commit_message.syntax +0 -36
  154. data/syntax/sweave.syntax +0 -84
  155. data/syntax/swig.syntax +0 -57
  156. data/syntax/tcl.syntax +0 -152
  157. data/syntax/template_toolkit.syntax +0 -121
  158. data/syntax/tex.syntax +0 -86
  159. data/syntax/tex_math.syntax +0 -49
  160. data/syntax/textile.syntax +0 -215
  161. data/syntax/tsv.syntax +0 -50
  162. data/syntax/twiki.syntax +0 -241
  163. data/syntax/txt2tags.syntax +0 -79
  164. data/syntax/vectorscript.syntax +0 -57
  165. data/syntax/xhtml_1.0.syntax +0 -4027
  166. data/syntax/xml.syntax +0 -180
  167. data/syntax/xml_strict.syntax +0 -92
  168. data/syntax/xsl.syntax +0 -60
  169. data/syntax/yaml.syntax +0 -160
  170. data/syntax/yui_javascript.syntax +0 -176
@@ -1,250 +0,0 @@
1
- ---
2
- name: reStructuredText
3
- fileTypes:
4
- - rst
5
- - rest
6
- scopeName: text.restructuredtext
7
- repository:
8
- inline:
9
- patterns:
10
- - captures:
11
- "2":
12
- name: meta.directive.restructuredtext
13
- "3":
14
- name: punctuation.definition.directive.restructuredtext
15
- "4":
16
- name: punctuation.separator.key-value.restructuredtext
17
- begin: ^([ \t]*)((\.\.)\sraw(::)) html
18
- end: ^(?!\1[ \t])
19
- patterns:
20
- - include: text.html.basic
21
- comment: directives.html
22
- - name: meta.other.directive.restructuredtext
23
- captures:
24
- "1":
25
- name: punctuation.definition.directive.restructuredtext
26
- "2":
27
- name: punctuation.separator.key-value.restructuredtext
28
- match: (\.\.)\s[A-z][A-z0-9-_]+(::)\s*$
29
- comment: directives
30
- - name: meta.raw.block.restructuredtext
31
- captures:
32
- "2":
33
- name: markup.raw.restructuredtext
34
- "3":
35
- name: punctuation.definition.raw.restructuredtext
36
- begin: ^([ \t]*).*?((::))
37
- end: ^(?=\1[^\s]+)
38
- patterns:
39
- - name: markup.raw.restructuredtext
40
- match: .+
41
- comment: verbatim blocks
42
- - name: meta.startraw.restructuredtext
43
- match: "::"
44
- comment: directives
45
- - name: markup.bold.restructuredtext
46
- captures:
47
- "1":
48
- name: punctuation.definition.italic.restructuredtext
49
- "2":
50
- name: punctuation.definition.italic.restructuredtext
51
- match: (\*\*)[^*]+(\*\*)
52
- comment: strong emphasis
53
- - name: markup.italic.restructuredtext
54
- captures:
55
- "1":
56
- name: punctuation.definition.italic.restructuredtext
57
- "2":
58
- name: punctuation.definition.italic.restructuredtext
59
- match: (\*)\w[^*]\w+(\*)
60
- comment: emphasis
61
- - name: meta.link.reference.def.restructuredtext
62
- captures:
63
- "1":
64
- name: punctuation.definition.link.restructuredtext
65
- "2":
66
- name: punctuation.definition.string.restructuredtext
67
- "3":
68
- name: string.other.link.title.restructuredtext
69
- "4":
70
- name: punctuation.separator.key-value.restructuredtext
71
- "5":
72
- name: markup.underline.link.restructuredtext
73
- match: (\.\.)\s+(_)([\w\s]+)(:)\s+(.*)
74
- comment: replacement
75
- - name: markup.underline.substitution.restructuredtext
76
- captures:
77
- "1":
78
- name: punctuation.definition.substitution.restructuredtext
79
- match: (\|)[^|]+(\|_{0,2})
80
- comment: substitution
81
- - name: meta.link.reference
82
- captures:
83
- "1":
84
- name: string.other.link.title.restructuredtext
85
- "2":
86
- name: punctuation.definition.link.restructuredtext
87
- match: \b(\w+)(_)\b
88
- comment: links `...`_ or `...`__
89
- - name: meta.link.reference
90
- captures:
91
- "1":
92
- name: punctuation.definition.link.restructuredtext
93
- "2":
94
- name: string.other.link.title.restructuredtext
95
- "3":
96
- name: punctuation.definition.link.restructuredtext
97
- match: (`)([\w\s]+)(`_)
98
- comment: links `...`_ or `...`__
99
- - name: meta.link.inline.restructuredtext
100
- captures:
101
- "6":
102
- name: punctuation.definition.link.restructuredtext
103
- "1":
104
- name: punctuation.definition.link.restructuredtext
105
- "2":
106
- name: string.other.link.title.restructuredtext
107
- "3":
108
- name: punctuation.definition.location.restructuredtext
109
- "4":
110
- name: markup.underline.link.restructuredtext
111
- "5":
112
- name: punctuation.definition.location.restructuredtext
113
- match: (`)([\w\s]+)\s+(<)(.*?)(>)(`_)
114
- comment: "links `...`_ "
115
- - name: meta.link.footnote.def.restructuredtext
116
- captures:
117
- "6":
118
- name: punctuation.definition.constant.restructuredtext
119
- "7":
120
- name: punctuation.definition.constant.restructuredtext
121
- "8":
122
- name: string.other.footnote.restructuredtext
123
- "1":
124
- name: punctuation.definition.link.restructuredtext
125
- "2":
126
- name: constant.other.footnote.link.restructuredtext
127
- "3":
128
- name: punctuation.definition.constant.restructuredtext
129
- match: ^(\.\.)\s+((\[)(((#?)[\w\s]*?)|\*)(\]))\s+(.*)
130
- comment: replacement
131
- - name: meta.link.footnote.numeric.restructuredtext
132
- captures:
133
- "1":
134
- name: constant.other.footnote.link
135
- "2":
136
- name: punctuation.definition.constant.restructuredtext
137
- "3":
138
- name: punctuation.definition.constant.restructuredtext
139
- "4":
140
- name: punctuation.definition.constant.restructuredtext
141
- match: ((\[)[0-9]+(\]))(_)
142
- comment: "footnote reference: [0]_"
143
- - name: meta.link.footnote.auto.restructuredtext
144
- captures:
145
- "1":
146
- name: constant.other.footnote.link
147
- "2":
148
- name: punctuation.definition.constant.restructuredtext
149
- "3":
150
- name: punctuation.definition.constant.restructuredtext
151
- "4":
152
- name: punctuation.definition.constant.restructuredtext
153
- match: ((\[#)[A-z0-9_]*(\]))(_)
154
- comment: footnote reference [#]_ or [#foo]_
155
- - name: meta.link.footnote.symbol.auto.restructuredtext
156
- captures:
157
- "1":
158
- name: constant.other.footnote.link.restructuredtext
159
- "2":
160
- name: punctuation.definition.constant.restructuredtext
161
- "3":
162
- name: punctuation.definition.constant.restructuredtext
163
- "4":
164
- name: punctuation.definition.constant.restructuredtext
165
- match: ((\[)\*(\]))(_)
166
- comment: footnote reference [*]_
167
- - name: meta.link.citation.def.restructuredtext
168
- captures:
169
- "6":
170
- name: string.other.citation.restructuredtext
171
- "1":
172
- name: punctuation.definition.link.restructuredtext
173
- "2":
174
- name: constant.other.citation.link.restructuredtext
175
- "3":
176
- name: punctuation.definition.constant.restructuredtext
177
- "4":
178
- name: punctuation.definition.constant.restructuredtext
179
- "5":
180
- name: punctuation.definition.constant.restructuredtext
181
- match: ^(\.\.)\s+((\[)[A-z][A-z0-9]*(\]))(_)\s+(.*)
182
- comment: replacement
183
- - name: meta.link.citation.restructuredtext
184
- captures:
185
- "1":
186
- name: constant.other.citation.link.restructuredtext
187
- "2":
188
- name: punctuation.definition.constant.restructuredtext
189
- "3":
190
- name: punctuation.definition.constant.restructuredtext
191
- "4":
192
- name: punctuation.definition.constant.restructuredtext
193
- match: ((\[)[A-z][A-z0-9_-]*(\]))(_)
194
- comment: citation reference
195
- - name: markup.raw.restructuredtext
196
- captures:
197
- "0":
198
- name: punctuation.definition.raw.restructuredtext
199
- begin: "``"
200
- end: "``"
201
- comment: inline literal
202
- - name: markup.other.command.restructuredtext
203
- captures:
204
- "1":
205
- name: punctuation.definition.intepreted.restructuredtext
206
- "2":
207
- name: punctuation.definition.intepreted.restructuredtext
208
- match: (`)[^`]+(`)(?!_)
209
- comment: intepreted text
210
- - name: entity.name.tag.restructuredtext
211
- captures:
212
- "1":
213
- name: punctuation.definition.field.restructuredtext
214
- "2":
215
- name: punctuation.definition.field.restructuredtext
216
- match: (:)[A-z][A-z0-9 =\s\t_]*(:)
217
- comment: field list
218
- - name: markup.other.table.restructuredtext
219
- captures:
220
- "0":
221
- name: punctuation.definition.table.restructuredtext
222
- match: \+-[+-]+
223
- comment: table
224
- - name: markup.other.table.restructuredtext
225
- captures:
226
- "0":
227
- name: punctuation.definition.table.restructuredtext
228
- match: \+=[+=]+
229
- comment: table
230
- - name: markup.heading.restructuredtext
231
- captures:
232
- "1":
233
- name: punctuation.definition.heading.restructuredtext
234
- match: (^(=|-|~|`|#|"|\^|\+|\*){3,}$){1,1}?
235
- - name: comment.line.double-dot.restructuredtext
236
- begin: ^(\.\.)
237
- beginCaptures:
238
- "1":
239
- name: punctuation.definition.comment.restructuredtext
240
- end: $\n?
241
- comment: comment
242
- uuid: 62DA9AD6-36E1-4AB7-BB87-E933AD9FD1A4
243
- patterns:
244
- - begin: ^([ \t]*)(?=\S)
245
- contentName: meta.paragraph.restructuredtext
246
- end: ^(?!\1(?=\S))
247
- patterns:
248
- - include: "#inline"
249
- keyEquivalent: ^~R
250
- comment: syntax highlighting for reStructuredText http://docutils.sourceforge.net, based on rst mode from jEdit
@@ -1,80 +0,0 @@
1
- ---
2
- name: Rez
3
- fileTypes:
4
- - r
5
- scopeName: source.rez
6
- repository:
7
- escaped_char:
8
- name: constant.character.escape.rez
9
- match: \\.
10
- uuid: F3EB29E9-8DB7-4052-9D48-5CDD2491D8D3
11
- foldingStartMarker: (/\*\*|\{\s*$)
12
- patterns:
13
- - name: comment.block.rez
14
- captures:
15
- "0":
16
- name: punctuation.definition.comment.rez
17
- begin: /\*
18
- end: \*/
19
- - name: comment.line.double-slash.rez
20
- captures:
21
- "1":
22
- name: punctuation.definition.comment.rez
23
- match: (//).*$\n?
24
- - name: keyword.control.rez
25
- match: \b(?i:(change|data|delete|include|read|resource|type))\b
26
- comment: Note that Xcode gets case sensitivity wrong (last checked Xcode 2.0). I'm not sure built-in functions are case-insensitive, though, so we might too.
27
- - name: storage.type.rez
28
- match: \b(?i:(align|array|binary|bit|bitstring|boolean|byte|case|char|cstring|decimal|enum|fill|hex|integer|key|literal|long|longint|nibble|octal|point|pstring|rect|string|switch|unsigned|wide|word|wstring))\b
29
- - name: keyword.other.attributes.rez
30
- match: \b(?i:(appheap|locked|nonpurgeable|purgeable|sysheap|unlocked))\b
31
- - name: support.function.built-in.rez
32
- captures:
33
- "1":
34
- name: punctuation.definition.function.rez
35
- match: (\$\$)(?i:(ArrayIndex|Attributes|BitField|Byte|CountOf|Date|Day|Format|Hour|ID|Long|Minute|Month|Name|PackedSize|Read|Resource|ResourceSize|Second|Shell|Time|Type|Version|Weekday|Word|Year))
36
- - name: constant.numeric.rez
37
- match: \b(((0(x|X|B)|\$)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)\b
38
- - name: string.quoted.double.rez
39
- endCaptures:
40
- "0":
41
- name: punctuation.definition.string.end.rez
42
- begin: "\""
43
- beginCaptures:
44
- "0":
45
- name: punctuation.definition.string.begin.rez
46
- end: "\""
47
- patterns:
48
- - include: "#escaped_char"
49
- - name: string.quoted.single.rez
50
- endCaptures:
51
- "0":
52
- name: punctuation.definition.string.end.rez
53
- begin: "'"
54
- beginCaptures:
55
- "0":
56
- name: punctuation.definition.string.begin.rez
57
- end: "'"
58
- patterns:
59
- - include: "#escaped_char"
60
- - name: string.quoted.other.hex.rez
61
- endCaptures:
62
- "0":
63
- name: punctuation.definition.string.end.rez
64
- begin: \$"
65
- beginCaptures:
66
- "0":
67
- name: punctuation.definition.string.begin.rez
68
- end: "\""
69
- patterns:
70
- - include: "#escaped_char"
71
- - name: meta.preprocessor.rez
72
- captures:
73
- "1":
74
- name: punctuation.definition.preprocessor.rez
75
- "2":
76
- name: keyword.control.import.rez
77
- match: ^\s*(#)\s*(define|defined|else|elif|endif|if|ifdef|ifndef|include|line|printf|undef)\b
78
- foldingStopMarker: (\*\*/|^\s*\})
79
- keyEquivalent: ^~R
80
- comment: "Rez. Legacy Mac OS source code frequently contains Rez files. \xE2\x80\x93 chris@cjack.com"
@@ -1,1035 +0,0 @@
1
- ---
2
- name: Ruby
3
- fileTypes:
4
- - rb
5
- - rbx
6
- - rjs
7
- - Rakefile
8
- - rake
9
- - cgi
10
- - fcgi
11
- - gemspec
12
- firstLineMatch: ^#!/.*\bruby\b
13
- scopeName: source.ruby
14
- repository:
15
- nest_brackets:
16
- captures:
17
- "0":
18
- name: punctuation.section.scope.ruby
19
- begin: \[
20
- end: \]
21
- patterns:
22
- - include: "#nest_brackets"
23
- interpolated_ruby:
24
- patterns:
25
- - name: source.ruby.embedded.source
26
- captures:
27
- "0":
28
- name: punctuation.section.embedded.ruby
29
- "1":
30
- name: source.ruby.embedded.source.empty
31
- match: "#\\{(\\})"
32
- - name: source.ruby.embedded.source
33
- captures:
34
- "0":
35
- name: punctuation.section.embedded.ruby
36
- begin: "#\\{"
37
- end: \}
38
- patterns:
39
- - include: "#nest_curly_and_self"
40
- - include: $self
41
- - name: variable.other.readwrite.instance.ruby
42
- captures:
43
- "1":
44
- name: punctuation.definition.variable.ruby
45
- match: (#@)[a-zA-Z_]\w*
46
- - name: variable.other.readwrite.class.ruby
47
- captures:
48
- "1":
49
- name: punctuation.definition.variable.ruby
50
- match: (#@@)[a-zA-Z_]\w*
51
- - name: variable.other.readwrite.global.ruby
52
- captures:
53
- "1":
54
- name: punctuation.definition.variable.ruby
55
- match: (#\$)[a-zA-Z_]\w*
56
- escaped_char:
57
- name: constant.character.escape.ruby
58
- match: \\(?:0\d{1,2}|x[\da-fA-F]{1,2}|.)
59
- regex_sub:
60
- patterns:
61
- - include: "#interpolated_ruby"
62
- - include: "#escaped_char"
63
- - name: string.regexp.arbitrary-repitition.ruby
64
- captures:
65
- "1":
66
- name: punctuation.definition.arbitrary-repitition.ruby
67
- "3":
68
- name: punctuation.definition.arbitrary-repitition.ruby
69
- match: (\{)\d+(,\d+)?(\})
70
- - name: string.regexp.character-class.ruby
71
- captures:
72
- "0":
73
- name: punctuation.definition.character-class.ruby
74
- begin: \[(?:\^?\])?
75
- end: \]
76
- patterns:
77
- - include: "#escaped_char"
78
- - name: string.regexp.group.ruby
79
- captures:
80
- "0":
81
- name: punctuation.definition.group.ruby
82
- begin: \(
83
- end: \)
84
- patterns:
85
- - include: "#regex_sub"
86
- - name: comment.line.number-sign.ruby
87
- captures:
88
- "1":
89
- name: punctuation.definition.comment.ruby
90
- match: (?<=^|\s)(#)\s[[a-zA-Z0-9,. \t?!-][^\x00-\x7F]]*$
91
- comment: We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.
92
- heredoc:
93
- begin: ^<<-?\w+
94
- end: $
95
- patterns:
96
- - include: $base
97
- nest_parens_r:
98
- captures:
99
- "0":
100
- name: punctuation.section.scope.ruby
101
- begin: \(
102
- end: \)
103
- patterns:
104
- - include: "#regex_sub"
105
- - include: "#nest_parens_r"
106
- nest_curly_r:
107
- captures:
108
- "0":
109
- name: punctuation.section.scope.ruby
110
- begin: \{
111
- end: \}
112
- patterns:
113
- - include: "#regex_sub"
114
- - include: "#nest_curly_r"
115
- nest_parens_i:
116
- captures:
117
- "0":
118
- name: punctuation.section.scope.ruby
119
- begin: \(
120
- end: \)
121
- patterns:
122
- - include: "#interpolated_ruby"
123
- - include: "#escaped_char"
124
- - include: "#nest_parens_i"
125
- nest_ltgt_r:
126
- captures:
127
- "0":
128
- name: punctuation.section.scope.ruby
129
- begin: \<
130
- end: \>
131
- patterns:
132
- - include: "#regex_sub"
133
- - include: "#nest_ltgt_r"
134
- nest_curly_i:
135
- captures:
136
- "0":
137
- name: punctuation.section.scope.ruby
138
- begin: \{
139
- end: \}
140
- patterns:
141
- - include: "#interpolated_ruby"
142
- - include: "#escaped_char"
143
- - include: "#nest_curly_i"
144
- nest_ltgt_i:
145
- captures:
146
- "0":
147
- name: punctuation.section.scope.ruby
148
- begin: \<
149
- end: \>
150
- patterns:
151
- - include: "#interpolated_ruby"
152
- - include: "#escaped_char"
153
- - include: "#nest_ltgt_i"
154
- nest_ltgt:
155
- captures:
156
- "0":
157
- name: punctuation.section.scope.ruby
158
- begin: \<
159
- end: \>
160
- patterns:
161
- - include: "#nest_ltgt"
162
- nest_curly_and_self:
163
- patterns:
164
- - captures:
165
- "0":
166
- name: punctuation.section.scope.ruby
167
- begin: \{
168
- end: \}
169
- patterns:
170
- - include: "#nest_curly_and_self"
171
- - include: $self
172
- nest_parens:
173
- captures:
174
- "0":
175
- name: punctuation.section.scope.ruby
176
- begin: \(
177
- end: \)
178
- patterns:
179
- - include: "#nest_parens"
180
- nest_brackets_r:
181
- captures:
182
- "0":
183
- name: punctuation.section.scope.ruby
184
- begin: \[
185
- end: \]
186
- patterns:
187
- - include: "#regex_sub"
188
- - include: "#nest_brackets_r"
189
- nest_curly:
190
- captures:
191
- "0":
192
- name: punctuation.section.scope.ruby
193
- begin: \{
194
- end: \}
195
- patterns:
196
- - include: "#nest_curly"
197
- nest_brackets_i:
198
- captures:
199
- "0":
200
- name: punctuation.section.scope.ruby
201
- begin: \[
202
- end: \]
203
- patterns:
204
- - include: "#interpolated_ruby"
205
- - include: "#escaped_char"
206
- - include: "#nest_brackets_i"
207
- uuid: E00B62AC-6B1C-11D9-9B1F-000D93589AF6
208
- foldingStartMarker: "(?x)^\n\
209
- \t (\\s*+\n\
210
- \t (module|class|def\n\
211
- \t |unless|if\n\
212
- \t |case\n\
213
- \t |begin\n\
214
- \t |for|while|until\n\
215
- \t\t\t |^=begin\n\
216
- \t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\
217
- \t | '(\\\\.|[^'])*+' # eat a single quoted string\n\
218
- \t | [^#\"'] # eat all but comments and strings\n\
219
- \t )*\n\
220
- \t ( \\s (do|begin|case)\n\
221
- \t | (?<!\\$)[-+=&|*/~%^<>~] \\s*+ (if|unless)\n\
222
- \t )\n\
223
- \t )\\b\n\
224
- \t (?! [^;]*+ ; .*? \\bend\\b )\n\
225
- \t |( \"(\\\\.|[^\"])*+\" # eat a double quoted string\n\
226
- \t | '(\\\\.|[^'])*+' # eat a single quoted string\n\
227
- \t | [^#\"'] # eat all but comments and strings\n\
228
- \t )*\n\
229
- \t ( \\{ (?! [^}]*+ \\} )\n\
230
- \t | \\[ (?! [^\\]]*+ \\] )\n\
231
- \t )\n\
232
- \t ).*$\n\
233
- \t| [#] .*? \\(fold\\) \\s*+ $ # Sune\xE2\x80\x99s special marker\n\
234
- \t"
235
- patterns:
236
- - name: meta.class.ruby
237
- captures:
238
- "6":
239
- name: variable.other.object.ruby
240
- "7":
241
- name: punctuation.definition.variable.ruby
242
- "1":
243
- name: keyword.control.class.ruby
244
- "2":
245
- name: entity.name.type.class.ruby
246
- "4":
247
- name: entity.other.inherited-class.ruby
248
- "5":
249
- name: punctuation.separator.inheritance.ruby
250
- match: ^\s*(class)\s+(([.a-zA-Z0-9_:]+(\s*(<)\s*[.a-zA-Z0-9_:]+)?)|((<<)\s*[.a-zA-Z0-9_:]+))
251
- - name: meta.module.ruby
252
- captures:
253
- "6":
254
- name: punctuation.separator.inheritance.ruby
255
- "7":
256
- name: entity.other.inherited-class.module.third.ruby
257
- "8":
258
- name: punctuation.separator.inheritance.ruby
259
- "1":
260
- name: keyword.control.module.ruby
261
- "2":
262
- name: entity.name.type.module.ruby
263
- "3":
264
- name: entity.other.inherited-class.module.first.ruby
265
- "4":
266
- name: punctuation.separator.inheritance.ruby
267
- "5":
268
- name: entity.other.inherited-class.module.second.ruby
269
- match: ^\s*(module)\s+(([A-Z]\w*(::))?([A-Z]\w*(::))?([A-Z]\w*(::))*[A-Z]\w*)
270
- - name: invalid.deprecated.ruby
271
- match: (?<!\.)\belse(\s)+if\b
272
- comment: "else if is a common mistake carried over from other languages. it works if you put in a second end, but it\xE2\x80\x99s never what you want."
273
- - name: keyword.control.ruby
274
- match: (?<!\.)\b(BEGIN|begin|case|class|else|elsif|END|end|ensure|for|if|in|module|rescue|then|unless|until|when|while)\b(?![?!])
275
- comment: everything being a reserved word, not a value and needing a 'end' is a..
276
- - name: keyword.control.ruby.start-block
277
- match: (?<!\.)\bdo\b\s*
278
- comment: contextual smart pair support for block parameters
279
- - name: meta.syntax.ruby.start-block
280
- match: (?<=\{)(\s+)
281
- comment: contextual smart pair support
282
- - name: keyword.operator.logical.ruby
283
- match: (?<!\.)\b(and|not|or)\b
284
- comment: " as above, just doesn't need a 'end' and does a logic operation"
285
- - name: keyword.control.pseudo-method.ruby
286
- match: (?<!\.)\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\b(?![?!])|\bdefined\?|\bblock_given\?
287
- comment: " just as above but being not a logical operation"
288
- - name: constant.language.ruby
289
- match: \b(nil|true|false)\b(?![?!])
290
- - name: variable.language.ruby
291
- match: \b(__(FILE|LINE)__|self)\b(?![?!])
292
- - name: keyword.other.special-method.ruby
293
- match: \b(initialize|new|loop|include|extend|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|module_function|public|protected)\b(?![?!])
294
- comment: " everything being a method but having a special function is a.."
295
- - name: meta.require.ruby
296
- captures:
297
- "1":
298
- name: keyword.other.special-method.ruby
299
- begin: \b(require)\b
300
- end: $|(?=#)
301
- patterns:
302
- - include: $base
303
- - name: variable.other.readwrite.instance.ruby
304
- captures:
305
- "1":
306
- name: punctuation.definition.variable.ruby
307
- match: (@)[a-zA-Z_]\w*
308
- - name: variable.other.readwrite.class.ruby
309
- captures:
310
- "1":
311
- name: punctuation.definition.variable.ruby
312
- match: (@@)[a-zA-Z_]\w*
313
- - name: variable.other.readwrite.global.ruby
314
- captures:
315
- "1":
316
- name: punctuation.definition.variable.ruby
317
- match: (\$)[a-zA-Z_]\w*
318
- - name: variable.other.readwrite.global.pre-defined.ruby
319
- captures:
320
- "1":
321
- name: punctuation.definition.variable.ruby
322
- match: (\$)(!|@|&|`|'|\+|\d|~|=|/|\\|,|;|\.|<|>|_|\*|\$|\?|:|"|-[0adFiIlpv])
323
- - name: support.class.ruby
324
- match: \b[A-Z][a-z]\w*(?=((\.|::)[A-Za-z]|\[))
325
- - name: meta.environment-variable.ruby
326
- begin: \b(ENV)\[
327
- beginCaptures:
328
- "1":
329
- name: variable.other.constant.ruby
330
- end: \]
331
- patterns:
332
- - include: $self
333
- - name: variable.other.constant.ruby
334
- match: \b[A-Z]\w*\b
335
- - name: meta.function.method.with-arguments.ruby
336
- endCaptures:
337
- "0":
338
- name: punctuation.definition.parameters.ruby
339
- begin: (?<=^|\s)\b(def)\b\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?))\s*(\()
340
- contentName: variable.parameter.function.ruby
341
- beginCaptures:
342
- "1":
343
- name: keyword.control.def.ruby
344
- "2":
345
- name: entity.name.function.ruby
346
- "3":
347
- name: punctuation.definition.parameters.ruby
348
- end: \)
349
- patterns:
350
- - include: $base
351
- comment: " the method pattern comes from the symbol pattern, see there for a explaination"
352
- - name: meta.function.method.without-arguments.ruby
353
- captures:
354
- "1":
355
- name: keyword.control.def.ruby
356
- "3":
357
- name: entity.name.function.ruby
358
- match: (?<=^|\s)(def)\b(\s+((?>[a-zA-Z_]\w*(?>\.|::))?(?>[a-zA-Z_]\w*(?>[?!]|=(?!>))?|===?|>[>=]?|<=>|<[<=]?|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?)))?
359
- comment: " the optional name is just to catch the def also without a method-name"
360
- - name: constant.numeric.ruby
361
- match: \b(0[xX]\h(?>_?\h)*|\d(?>_?\d)*(\.(?![^[:space:][:digit:]])(?>_?\d)*)?([eE][-+]?\d(?>_?\d)*)?|0[bB][01]+)\b
362
- - name: constant.other.symbol.single-quoted.ruby
363
- captures:
364
- "0":
365
- name: punctuation.definition.constant.ruby
366
- begin: ":'"
367
- end: "'"
368
- patterns:
369
- - name: constant.character.escape.ruby
370
- match: \\['\\]
371
- - name: constant.other.symbol.double-quoted.ruby
372
- captures:
373
- "0":
374
- name: punctuation.definition.constant.ruby
375
- begin: ":\""
376
- end: "\""
377
- patterns:
378
- - include: "#interpolated_ruby"
379
- - include: "#escaped_char"
380
- - name: string.quoted.single.ruby
381
- endCaptures:
382
- "0":
383
- name: punctuation.definition.string.end.ruby
384
- begin: "'"
385
- beginCaptures:
386
- "0":
387
- name: punctuation.definition.string.begin.ruby
388
- end: "'"
389
- patterns:
390
- - name: constant.character.escape.ruby
391
- match: \\'|\\\\
392
- comment: single quoted string (does not allow interpolation)
393
- - name: string.quoted.double.ruby
394
- endCaptures:
395
- "0":
396
- name: punctuation.definition.string.end.ruby
397
- begin: "\""
398
- beginCaptures:
399
- "0":
400
- name: punctuation.definition.string.begin.ruby
401
- end: "\""
402
- patterns:
403
- - include: "#interpolated_ruby"
404
- - include: "#escaped_char"
405
- comment: double quoted string (allows for interpolation)
406
- - name: string.interpolated.ruby
407
- endCaptures:
408
- "0":
409
- name: punctuation.definition.string.end.ruby
410
- begin: "`"
411
- beginCaptures:
412
- "0":
413
- name: punctuation.definition.string.begin.ruby
414
- end: "`"
415
- patterns:
416
- - include: "#interpolated_ruby"
417
- - include: "#escaped_char"
418
- comment: execute string (allows for interpolation)
419
- - name: string.interpolated.ruby
420
- endCaptures:
421
- "0":
422
- name: punctuation.definition.string.end.ruby
423
- begin: "%x\\{"
424
- beginCaptures:
425
- "0":
426
- name: punctuation.definition.string.begin.ruby
427
- end: \}
428
- patterns:
429
- - include: "#interpolated_ruby"
430
- - include: "#escaped_char"
431
- - include: "#nest_curly_i"
432
- comment: execute string (allow for interpolation)
433
- - name: string.interpolated.ruby
434
- endCaptures:
435
- "0":
436
- name: punctuation.definition.string.end.ruby
437
- begin: "%x\\["
438
- beginCaptures:
439
- "0":
440
- name: punctuation.definition.string.begin.ruby
441
- end: \]
442
- patterns:
443
- - include: "#interpolated_ruby"
444
- - include: "#escaped_char"
445
- - include: "#nest_brackets_i"
446
- comment: execute string (allow for interpolation)
447
- - name: string.interpolated.ruby
448
- endCaptures:
449
- "0":
450
- name: punctuation.definition.string.end.ruby
451
- begin: "%x\\<"
452
- beginCaptures:
453
- "0":
454
- name: punctuation.definition.string.begin.ruby
455
- end: \>
456
- patterns:
457
- - include: "#interpolated_ruby"
458
- - include: "#escaped_char"
459
- - include: "#nest_ltgt_i"
460
- comment: execute string (allow for interpolation)
461
- - name: string.interpolated.ruby
462
- endCaptures:
463
- "0":
464
- name: punctuation.definition.string.end.ruby
465
- begin: "%x\\("
466
- beginCaptures:
467
- "0":
468
- name: punctuation.definition.string.begin.ruby
469
- end: \)
470
- patterns:
471
- - include: "#interpolated_ruby"
472
- - include: "#escaped_char"
473
- - include: "#nest_parens_i"
474
- comment: execute string (allow for interpolation)
475
- - name: string.interpolated.ruby
476
- endCaptures:
477
- "0":
478
- name: punctuation.definition.string.end.ruby
479
- begin: "%x([^\\w])"
480
- beginCaptures:
481
- "0":
482
- name: punctuation.definition.string.begin.ruby
483
- end: \1
484
- patterns:
485
- - include: "#interpolated_ruby"
486
- - include: "#escaped_char"
487
- comment: execute string (allow for interpolation)
488
- - captures:
489
- "1":
490
- name: string.regexp.classic.ruby
491
- "2":
492
- name: punctuation.definition.string.ruby
493
- begin: "(?x)\n\
494
- \t\t\t (?:\n\
495
- \t\t\t ^ # beginning of line\n\
496
- \t\t\t | (?<= # or look-behind on:\n\
497
- \t\t\t [=>~(?:\\[,|&]\n\
498
- \t\t\t | (?:\\s|;)when\\s\n\
499
- \t\t\t | (?:\\s|;)or\\s\n\
500
- \t\t\t | (?:\\s|;)and\\s\n\
501
- \t\t\t | (?:\\s|;|\\.)index\\s\n\
502
- \t\t\t | (?:\\s|;|\\.)scan\\s\n\
503
- \t\t\t | (?:\\s|;|\\.)sub\\s\n\
504
- \t\t\t | (?:\\s|l|\\.)sub!\\s\n\
505
- \t\t\t | (?:\\s|;|\\.)gsub\\s\n\
506
- \t\t\t | (?:\\s|;|\\.)gsub!\\s\n\
507
- \t\t\t | (?:\\s|;|\\.)match\\s\n\
508
- \t\t\t | (?:\\s|;)if\\s\n\
509
- \t\t\t | (?:\\s|;)elsif\\s\n\
510
- \t\t\t | (?:\\s|;)while\\s\n\
511
- \t\t\t | (?:\\s|;)unless\\s\n\
512
- \t\t\t )\n\
513
- \t\t\t | (?<= # or a look-behind with line anchor:\n\
514
- \t\t\t ^when\\s # duplication necessary due to limits of regex\n\
515
- \t\t\t | ^index\\s\n\
516
- \t\t\t | ^scan\\s\n\
517
- \t\t\t | ^sub\\s\n\
518
- \t\t\t | ^gsub\\s\n\
519
- \t\t\t | ^sub!\\s\n\
520
- \t\t\t | ^gsub!\\s\n\
521
- \t\t\t | ^match\\s\n\
522
- \t\t\t | ^if\\s\n\
523
- \t\t\t | ^elsif\\s\n\
524
- \t\t\t | ^while\\s\n\
525
- \t\t\t | ^unless\\s\n\
526
- \t\t\t )\n\
527
- \t\t\t )\n\
528
- \t\t\t \\s*((/))(?![*+{}?])\n\
529
- \t\t\t"
530
- contentName: string.regexp.classic.ruby
531
- end: ((/[eimnosux]*))
532
- patterns:
533
- - include: "#regex_sub"
534
- comment: "regular expressions (normal)\n\
535
- \t\t\twe only start a regexp if the character before it (excluding whitespace)\n\
536
- \t\t\tis what we think is before a regexp\n\
537
- \t\t\t"
538
- - name: string.regexp.mod-r.ruby
539
- endCaptures:
540
- "0":
541
- name: punctuation.definition.string.end.ruby
542
- begin: "%r\\{"
543
- beginCaptures:
544
- "0":
545
- name: punctuation.definition.string.begin.ruby
546
- end: \}[eimnosux]*
547
- patterns:
548
- - include: "#regex_sub"
549
- - include: "#nest_curly_r"
550
- comment: regular expressions (literal)
551
- - name: string.regexp.mod-r.ruby
552
- endCaptures:
553
- "0":
554
- name: punctuation.definition.string.end.ruby
555
- begin: "%r\\["
556
- beginCaptures:
557
- "0":
558
- name: punctuation.definition.string.begin.ruby
559
- end: \][eimnosux]*
560
- patterns:
561
- - include: "#regex_sub"
562
- - include: "#nest_brackets_r"
563
- comment: regular expressions (literal)
564
- - name: string.regexp.mod-r.ruby
565
- endCaptures:
566
- "0":
567
- name: punctuation.definition.string.end.ruby
568
- begin: "%r\\("
569
- beginCaptures:
570
- "0":
571
- name: punctuation.definition.string.begin.ruby
572
- end: \)[eimnosux]*
573
- patterns:
574
- - include: "#regex_sub"
575
- - include: "#nest_parens_r"
576
- comment: regular expressions (literal)
577
- - name: string.regexp.mod-r.ruby
578
- endCaptures:
579
- "0":
580
- name: punctuation.definition.string.end.ruby
581
- begin: "%r\\<"
582
- beginCaptures:
583
- "0":
584
- name: punctuation.definition.string.begin.ruby
585
- end: \>[eimnosux]*
586
- patterns:
587
- - include: "#regex_sub"
588
- - include: "#nest_ltgt_r"
589
- comment: regular expressions (literal)
590
- - name: string.regexp.mod-r.ruby
591
- endCaptures:
592
- "0":
593
- name: punctuation.definition.string.end.ruby
594
- begin: "%r([^\\w])"
595
- beginCaptures:
596
- "0":
597
- name: punctuation.definition.string.begin.ruby
598
- end: \1[eimnosux]*
599
- patterns:
600
- - include: "#regex_sub"
601
- comment: regular expressions (literal)
602
- - name: string.quoted.other.literal.upper.ruby
603
- endCaptures:
604
- "0":
605
- name: punctuation.definition.string.end.ruby
606
- begin: "%[QWSR]?\\("
607
- beginCaptures:
608
- "0":
609
- name: punctuation.definition.string.begin.ruby
610
- end: \)
611
- patterns:
612
- - include: "#interpolated_ruby"
613
- - include: "#escaped_char"
614
- - include: "#nest_parens_i"
615
- comment: literal capable of interpolation ()
616
- - name: string.quoted.other.literal.upper.ruby
617
- endCaptures:
618
- "0":
619
- name: punctuation.definition.string.end.ruby
620
- begin: "%[QWSR]?\\["
621
- beginCaptures:
622
- "0":
623
- name: punctuation.definition.string.begin.ruby
624
- end: \]
625
- patterns:
626
- - include: "#interpolated_ruby"
627
- - include: "#escaped_char"
628
- - include: "#nest_brackets_i"
629
- comment: literal capable of interpolation []
630
- - name: string.quoted.other.literal.upper.ruby
631
- endCaptures:
632
- "0":
633
- name: punctuation.definition.string.end.ruby
634
- begin: "%[QWSR]?\\<"
635
- beginCaptures:
636
- "0":
637
- name: punctuation.definition.string.begin.ruby
638
- end: \>
639
- patterns:
640
- - include: "#interpolated_ruby"
641
- - include: "#escaped_char"
642
- - include: "#nest_ltgt_i"
643
- comment: literal capable of interpolation <>
644
- - name: string.quoted.double.ruby.mod
645
- endCaptures:
646
- "0":
647
- name: punctuation.definition.string.end.ruby
648
- begin: "%[QWSR]?\\{"
649
- beginCaptures:
650
- "0":
651
- name: punctuation.definition.string.begin.ruby
652
- end: \}
653
- patterns:
654
- - include: "#interpolated_ruby"
655
- - include: "#escaped_char"
656
- - include: "#nest_curly_i"
657
- comment: literal capable of interpolation -- {}
658
- - name: string.quoted.other.literal.upper.ruby
659
- endCaptures:
660
- "0":
661
- name: punctuation.definition.string.end.ruby
662
- begin: "%[QWSR]([^\\w])"
663
- beginCaptures:
664
- "0":
665
- name: punctuation.definition.string.begin.ruby
666
- end: \1
667
- patterns:
668
- - include: "#interpolated_ruby"
669
- - include: "#escaped_char"
670
- comment: literal capable of interpolation -- wildcard
671
- - name: string.quoted.other.literal.other.ruby
672
- endCaptures:
673
- "0":
674
- name: punctuation.definition.string.end.ruby
675
- begin: "%([^\\w\\s=])"
676
- beginCaptures:
677
- "0":
678
- name: punctuation.definition.string.begin.ruby
679
- end: \1
680
- patterns:
681
- - include: "#interpolated_ruby"
682
- - include: "#escaped_char"
683
- comment: literal capable of interpolation -- wildcard
684
- - name: string.quoted.other.literal.lower.ruby
685
- endCaptures:
686
- "0":
687
- name: punctuation.definition.string.end.ruby
688
- begin: "%[qws]\\("
689
- beginCaptures:
690
- "0":
691
- name: punctuation.definition.string.begin.ruby
692
- end: \)
693
- patterns:
694
- - name: constant.character.escape.ruby
695
- match: \\\)|\\\\
696
- - include: "#nest_parens"
697
- comment: literal incapable of interpolation -- ()
698
- - name: string.quoted.other.literal.lower.ruby
699
- endCaptures:
700
- "0":
701
- name: punctuation.definition.string.end.ruby
702
- begin: "%[qws]\\<"
703
- beginCaptures:
704
- "0":
705
- name: punctuation.definition.string.begin.ruby
706
- end: \>
707
- patterns:
708
- - name: constant.character.escape.ruby
709
- match: \\\>|\\\\
710
- - include: "#nest_ltgt"
711
- comment: literal incapable of interpolation -- <>
712
- - name: string.quoted.other.literal.lower.ruby
713
- endCaptures:
714
- "0":
715
- name: punctuation.definition.string.end.ruby
716
- begin: "%[qws]\\["
717
- beginCaptures:
718
- "0":
719
- name: punctuation.definition.string.begin.ruby
720
- end: \]
721
- patterns:
722
- - name: constant.character.escape.ruby
723
- match: \\\]|\\\\
724
- - include: "#nest_brackets"
725
- comment: literal incapable of interpolation -- []
726
- - name: string.quoted.other.literal.lower.ruby
727
- endCaptures:
728
- "0":
729
- name: punctuation.definition.string.end.ruby
730
- begin: "%[qws]\\{"
731
- beginCaptures:
732
- "0":
733
- name: punctuation.definition.string.begin.ruby
734
- end: \}
735
- patterns:
736
- - name: constant.character.escape.ruby
737
- match: \\\}|\\\\
738
- - include: "#nest_curly"
739
- comment: literal incapable of interpolation -- {}
740
- - name: string.quoted.other.literal.lower.ruby
741
- endCaptures:
742
- "0":
743
- name: punctuation.definition.string.end.ruby
744
- begin: "%[qws]([^\\w])"
745
- beginCaptures:
746
- "0":
747
- name: punctuation.definition.string.begin.ruby
748
- end: \1
749
- patterns:
750
- - match: \\.
751
- comment: Cant be named because its not neccesarily an escape.
752
- comment: literal incapable of interpolation -- wildcard
753
- - name: constant.other.symbol.ruby
754
- captures:
755
- "1":
756
- name: punctuation.definition.constant.ruby
757
- match: (?<!:)(:)(?>[a-zA-Z_]\w*(?>[?!]|=(?![>=]))?|===?|>[>=]?|<[<=]?|<=>|[%&`/\|]|\*\*?|=?~|[-+]@?|\[\]=?|@@?[a-zA-Z_]\w*)
758
- comment: symbols
759
- - name: comment.block.documentation.ruby
760
- captures:
761
- "0":
762
- name: punctuation.definition.comment.ruby
763
- begin: ^=begin
764
- end: ^=end
765
- comment: multiline comments
766
- - name: comment.line.number-sign.ruby
767
- captures:
768
- "1":
769
- name: punctuation.definition.comment.ruby
770
- match: (?:^[ \t]+)?(#).*$\n?
771
- - name: constant.numeric.ruby
772
- match: (?<!\w)\?(\\(x\h{1,2}(?!\h)\b|0[0-7]{0,2}(?![0-7])\b|[^x0MC])|(\\[MC]-)+\w|[^\s\\])
773
- comment: "\n\
774
- \t\t\tmatches questionmark-letters.\n\n\
775
- \t\t\texamples (1st alternation = hex):\n\
776
- \t\t\t?\\x1 ?\\x61\n\n\
777
- \t\t\texamples (2nd alternation = octal):\n\
778
- \t\t\t?\\0 ?\\07 ?\\017\n\n\
779
- \t\t\texamples (3rd alternation = escaped):\n\
780
- \t\t\t?\\n ?\\b\n\n\
781
- \t\t\texamples (4th alternation = meta-ctrl):\n\
782
- \t\t\t?\\C-a ?\\M-a ?\\C-\\M-\\C-\\M-a\n\n\
783
- \t\t\texamples (4th alternation = normal):\n\
784
- \t\t\t?a ?A ?0 \n\
785
- \t\t\t?* ?\" ?( \n\
786
- \t\t\t?. ?#\n\
787
- \t\t\t\n\
788
- \t\t\t\n\
789
- \t\t\tthe negative lookbehind prevents against matching\n\
790
- \t\t\tp(42.tainted?)\n\
791
- \t\t\t"
792
- - captures:
793
- "0":
794
- name: string.unquoted.program-block.ruby
795
- begin: ^__END__\n
796
- contentName: text.plain
797
- end: (?=not)impossible
798
- patterns:
799
- - name: text.html.embedded.ruby
800
- begin: (?=<?xml|<(?i:html\b)|!DOCTYPE (?i:html\b))
801
- end: (?=not)impossible
802
- patterns:
803
- - include: text.html.basic
804
- comment: __END__ marker
805
- - name: string.unquoted.heredoc.ruby
806
- endCaptures:
807
- "0":
808
- name: punctuation.definition.string.end.ruby
809
- begin: (?>\=\s*<<(\w+))(?!\s+#\s*([Cc]|sh|[Jj]ava))
810
- beginCaptures:
811
- "0":
812
- name: punctuation.definition.string.begin.ruby
813
- end: ^\1$
814
- patterns:
815
- - include: "#heredoc"
816
- - include: "#interpolated_ruby"
817
- - include: "#escaped_char"
818
- - name: string.unquoted.embedded.html.ruby
819
- endCaptures:
820
- "0":
821
- name: punctuation.definition.string.end.ruby
822
- begin: (?><<-HTML\b)
823
- contentName: text.html.embedded.ruby
824
- beginCaptures:
825
- "0":
826
- name: punctuation.definition.string.begin.ruby
827
- end: \s*HTML$
828
- patterns:
829
- - include: "#heredoc"
830
- - include: text.html.basic
831
- - include: "#interpolated_ruby"
832
- - include: "#escaped_char"
833
- comment: heredoc with embedded HTML and indented terminator
834
- - name: string.unquoted.embedded.ruby.ruby
835
- endCaptures:
836
- "0":
837
- name: punctuation.definition.string.end.ruby
838
- begin: (?><<-(["\\']?)(\w+_(?i:eval))\1)
839
- beginCaptures:
840
- "0":
841
- name: punctuation.definition.string.begin.ruby
842
- end: \s*\2$
843
- patterns:
844
- - include: "#heredoc"
845
- - include: "#interpolated_ruby"
846
- - include: source.ruby
847
- - include: "#escaped_char"
848
- comment: ruby code in heredoc, interpolated
849
- - name: string.unquoted.heredoc.ruby
850
- endCaptures:
851
- "0":
852
- name: punctuation.definition.string.end.ruby
853
- begin: (?><<-(\w+))
854
- beginCaptures:
855
- "0":
856
- name: punctuation.definition.string.begin.ruby
857
- end: \s*\1$
858
- patterns:
859
- - include: "#heredoc"
860
- - include: "#interpolated_ruby"
861
- - include: "#escaped_char"
862
- comment: heredoc with indented terminator
863
- - name: string.unquoted.embedded.c.ruby
864
- endCaptures:
865
- "0":
866
- name: punctuation.definition.string.end.ruby
867
- begin: (?>\=\s*<<(\w+))(?=\s+#\s*[Cc](?!(\+\+|[Ss][Ss])))
868
- beginCaptures:
869
- "0":
870
- name: punctuation.definition.string.begin.ruby
871
- end: ^\1$
872
- patterns:
873
- - include: "#heredoc"
874
- - include: source.c
875
- - include: "#interpolated_ruby"
876
- - include: "#escaped_char"
877
- - name: string.unquoted.embedded.cplusplus.ruby
878
- endCaptures:
879
- "0":
880
- name: punctuation.definition.string.end.ruby
881
- begin: (?>\=\s*<<(\w+))(?=\s+#\s*[Cc]\+\+)
882
- beginCaptures:
883
- "0":
884
- name: punctuation.definition.string.begin.ruby
885
- end: ^\1$
886
- patterns:
887
- - include: "#heredoc"
888
- - include: source.c++
889
- - include: "#interpolated_ruby"
890
- - include: "#escaped_char"
891
- - name: string.unquoted.embedded.css.ruby
892
- endCaptures:
893
- "0":
894
- name: punctuation.definition.string.end.ruby
895
- begin: (?>\=\s*<<(\w+))(?=\s+#\s*[Cc][Ss][Ss])
896
- beginCaptures:
897
- "0":
898
- name: punctuation.definition.string.begin.ruby
899
- end: ^\1$
900
- patterns:
901
- - include: "#heredoc"
902
- - include: source.css
903
- - include: "#interpolated_ruby"
904
- - include: "#escaped_char"
905
- - name: string.unquoted.embedded.js.ruby
906
- endCaptures:
907
- "0":
908
- name: punctuation.definition.string.end.ruby
909
- begin: (?>\=\s*<<(\w+))(?=\s+#\s*[Jj]ava[Ss]cript)
910
- beginCaptures:
911
- "0":
912
- name: punctuation.definition.string.begin.ruby
913
- end: ^\1$
914
- patterns:
915
- - include: "#heredoc"
916
- - include: source.js
917
- - include: "#interpolated_ruby"
918
- - include: "#escaped_char"
919
- - name: string.unquoted.embedded.shell.ruby
920
- endCaptures:
921
- "0":
922
- name: punctuation.definition.string.end.ruby
923
- begin: (?>\=\s*<<(\w+))(?=\s+#\s*sh)
924
- beginCaptures:
925
- "0":
926
- name: punctuation.definition.string.begin.ruby
927
- end: ^\1$
928
- patterns:
929
- - include: "#heredoc"
930
- - include: source.shell
931
- - include: "#interpolated_ruby"
932
- - include: "#escaped_char"
933
- - name: meta.function-call.method.with-arguments.ruby
934
- begin: (?<=[^\.])(?=(\.|::)[a-zA-Z][a-zA-Z0-9_!?=]*\()(\.|::)
935
- beginCaptures:
936
- "1":
937
- name: punctuation.separator.method.ruby
938
- end: (?<=[a-zA-Z0-9_!?=])(?=\()
939
- patterns:
940
- - comment: "made this way to eventually support including #known_function_names"
941
- - name: entity.name.function.ruby
942
- match: ([a-zA-Z][a-zA-Z0-9_!?=]*)(?=[^a-zA-Z0-9_!?])
943
- - name: meta.function-call.method.without-arguments.ruby
944
- begin: (?<=[^\.])(?=(\.|::)[a-zA-Z][a-zA-Z0-9_!?]*[^a-zA-Z0-9_!?])(\.|::)
945
- beginCaptures:
946
- "1":
947
- name: punctuation.separator.method.ruby
948
- end: (?<=[a-zA-Z0-9_!?])(?=[^a-zA-Z0-9_!?])
949
- patterns:
950
- - comment: "made this way to eventually support including #known_function_names"
951
- - name: entity.name.function.ruby
952
- match: ([a-zA-Z][a-zA-Z0-9_!?]*)(?=[^a-zA-Z0-9_!?])
953
- - name: meta.function-call.ruby
954
- begin: (?=[a-zA-Z][a-zA-Z0-9_!?]+\()
955
- end: (?=\()
956
- patterns:
957
- - comment: "eventually include #known_function_names"
958
- - name: entity.name.function.ruby
959
- match: ([a-zA-Z0-9_!?]+)(?=\()
960
- - captures:
961
- "1":
962
- name: punctuation.separator.variable.ruby
963
- begin: (?<=\{|do|\{\s|do\s)(\|)
964
- end: (\|)
965
- patterns:
966
- - name: variable.other.block.ruby
967
- match: "[_a-zA-Z][_a-zA-Z0-9]*"
968
- - name: punctuation.separator.variable.ruby
969
- match: ","
970
- - name: punctuation.separator.key-value
971
- match: =>
972
- - name: keyword.operator.unary.ruby
973
- match: \+@|-@
974
- - name: keyword.operator.assignment.augmented.ruby
975
- match: <<=|%=|&=|\*=|\*\*=|\+=|\-=|\^=|\|{1,2}=|/=|<<
976
- - name: keyword.operator.comparison.ruby
977
- match: <=>|<(?!<|=)|>(?!<|=|>)|<=|>=|===|==|=~|!=|!~|(?<=[ \t])\?
978
- - name: keyword.operator.logical.ruby
979
- match: (?<=[ \t])!|\bnot\b|&&|\band\b|\|\||\bor\b|\^
980
- - name: keyword.operator.arithmetic.ruby
981
- match: (%|&|\*\*|\*|\+|\-|/)
982
- - name: keyword.operator.assignment.ruby
983
- match: "="
984
- - name: keyword.operator.other.ruby
985
- match: \||~|>>
986
- - name: punctuation.separator.other.ruby
987
- match: ":"
988
- - name: punctuation.separator.statement.ruby
989
- match: \;
990
- - name: punctuation.separator.object.ruby
991
- match: ","
992
- - name: punctuation.separator.method.ruby
993
- match: "\\.|::"
994
- - name: punctuation.section.scope.ruby
995
- match: \{|\}
996
- - name: punctuation.section.array.ruby
997
- match: \[|\]
998
- - name: punctuation.section.function.ruby
999
- match: \(|\)
1000
- foldingStopMarker: "(?x)\n\
1001
- \t\t( (^|;) \\s*+ end \\s*+ ([#].*)? $\n\
1002
- \t\t| (^|;) \\s*+ end \\. .* $\n\
1003
- \t\t| ^ \\s*+ [}\\]] \\s*+ ([#].*)? $\n\
1004
- \t\t| [#] .*? \\(end\\) \\s*+ $ # Sune\xE2\x80\x99s special marker\n\
1005
- \t\t| ^=end\n\
1006
- \t\t)"
1007
- keyEquivalent: ^~R
1008
- comment: "\n\
1009
- \tTODO: unresolved issues\n\n\
1010
- \ttext:\n\
1011
- \t\"p << end\n\
1012
- \tprint me!\n\
1013
- \tend\"\n\
1014
- \tsymptoms:\n\
1015
- \tnot recognized as a heredoc\n\
1016
- \tsolution:\n\
1017
- \tthere is no way to distinguish perfectly between the << operator and the start\n\
1018
- \tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\
1019
- \trefinement is possible.\n\
1020
- \t\xE2\x80\xA2 Heredocs with indented terminators (<<-) are always distinguishable, however.\n\
1021
- \t\xE2\x80\xA2 Nested heredocs are not really supportable at present\n\n\
1022
- \ttext:\n\
1023
- \tprint <<-'THERE' \n\
1024
- \tThis is single quoted. \n\
1025
- \tThe above used #{Time.now} \n\
1026
- \tTHERE \n\
1027
- \tsymtoms:\n\
1028
- \tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\
1029
- \t\n\
1030
- \ttext:\n\
1031
- \t\"a\\332a\"\n\
1032
- \tsymptoms:\n\
1033
- \t'\\332' is not recognized as slash3.. which should be octal 332.\n\
1034
- \tsolution:\n\
1035
- \tplain regexp.. should be easy.\n\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n"