code_rippa 0.0.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile.lock +36 -0
  3. data/LICENSE +2 -2
  4. data/README.md +18 -1
  5. data/bin/code_rippa +15 -16
  6. data/code_rippa.gemspec +12 -10
  7. data/lib/code_rippa.rb +69 -51
  8. data/lib/code_rippa/syntax/actionscript.syntax +52 -52
  9. data/lib/code_rippa/syntax/active4d.syntax +226 -180
  10. data/lib/code_rippa/syntax/active4d_html.syntax +163 -173
  11. data/lib/code_rippa/syntax/active4d_ini.syntax +34 -27
  12. data/lib/code_rippa/syntax/active4d_library.syntax +8 -15
  13. data/lib/code_rippa/syntax/ada.syntax +19 -18
  14. data/lib/code_rippa/syntax/antlr.syntax +85 -85
  15. data/lib/code_rippa/syntax/apache.syntax +103 -109
  16. data/lib/code_rippa/syntax/applescript.syntax +244 -229
  17. data/lib/code_rippa/syntax/asp.syntax +41 -36
  18. data/lib/code_rippa/syntax/asp_vb.net.syntax +77 -72
  19. data/lib/code_rippa/syntax/bibtex.syntax +88 -90
  20. data/lib/code_rippa/syntax/blog_html.syntax +17 -29
  21. data/lib/code_rippa/syntax/blog_markdown.syntax +17 -27
  22. data/lib/code_rippa/syntax/blog_text.syntax +15 -15
  23. data/lib/code_rippa/syntax/blog_textile.syntax +15 -15
  24. data/lib/code_rippa/syntax/build.syntax +27 -27
  25. data/lib/code_rippa/syntax/bulletin_board.syntax +159 -172
  26. data/lib/code_rippa/syntax/c.syntax +31 -34
  27. data/lib/code_rippa/syntax/cake.syntax +27 -27
  28. data/lib/code_rippa/syntax/camlp4.syntax +23 -23
  29. data/lib/code_rippa/syntax/cm.syntax +19 -18
  30. data/lib/code_rippa/syntax/coffeescript.syntax +134 -181
  31. data/lib/code_rippa/syntax/coldfusion.syntax +51 -60
  32. data/lib/code_rippa/syntax/context_free.syntax +106 -106
  33. data/lib/code_rippa/syntax/cs.syntax +31 -34
  34. data/lib/code_rippa/syntax/css.syntax +112 -112
  35. data/lib/code_rippa/syntax/css_experimental.syntax +1006 -1004
  36. data/lib/code_rippa/syntax/csv.syntax +40 -44
  37. data/lib/code_rippa/syntax/d.syntax +80 -84
  38. data/lib/code_rippa/syntax/diff.syntax +46 -45
  39. data/lib/code_rippa/syntax/dokuwiki.syntax +118 -119
  40. data/lib/code_rippa/syntax/dot.syntax +26 -26
  41. data/lib/code_rippa/syntax/doxygen.syntax +26 -26
  42. data/lib/code_rippa/syntax/dylan.syntax +35 -35
  43. data/lib/code_rippa/syntax/eiffel.syntax +39 -42
  44. data/lib/code_rippa/syntax/erlang.syntax +514 -511
  45. data/lib/code_rippa/syntax/f-script.syntax +44 -44
  46. data/lib/code_rippa/syntax/fortran.syntax +80 -76
  47. data/lib/code_rippa/syntax/fxscript.syntax +78 -77
  48. data/lib/code_rippa/syntax/greasemonkey.syntax +20 -20
  49. data/lib/code_rippa/syntax/gri.syntax +47 -47
  50. data/lib/code_rippa/syntax/groovy.syntax +105 -114
  51. data/lib/code_rippa/syntax/gtd.syntax +10 -10
  52. data/lib/code_rippa/syntax/gtdalt.syntax +83 -83
  53. data/lib/code_rippa/syntax/haml.syntax +50 -50
  54. data/lib/code_rippa/syntax/haskell.syntax +47 -47
  55. data/lib/code_rippa/syntax/html-asp.syntax +15 -15
  56. data/lib/code_rippa/syntax/html_django.syntax +15 -14
  57. data/lib/code_rippa/syntax/html_for_asp.net.syntax +232 -245
  58. data/lib/code_rippa/syntax/html_mason.syntax +75 -74
  59. data/lib/code_rippa/syntax/html_rails.syntax +17 -27
  60. data/lib/code_rippa/syntax/html_tcl.syntax +13 -13
  61. data/lib/code_rippa/syntax/icalendar.syntax +15 -15
  62. data/lib/code_rippa/syntax/inform.syntax +26 -26
  63. data/lib/code_rippa/syntax/ini.syntax +30 -30
  64. data/lib/code_rippa/syntax/installer_distribution_script.syntax +49 -49
  65. data/lib/code_rippa/syntax/io.syntax +49 -46
  66. data/lib/code_rippa/syntax/java.syntax +117 -126
  67. data/lib/code_rippa/syntax/javaproperties.syntax +13 -12
  68. data/lib/code_rippa/syntax/javascript.syntax +141 -141
  69. data/lib/code_rippa/syntax/javascript_+_prototype.syntax +42 -41
  70. data/lib/code_rippa/syntax/javascript_+_prototype_bracketed.syntax +92 -91
  71. data/lib/code_rippa/syntax/jquery_javascript.syntax +64 -64
  72. data/lib/code_rippa/syntax/json.syntax +39 -39
  73. data/lib/code_rippa/syntax/languagedefinition.syntax +373 -453
  74. data/lib/code_rippa/syntax/lexflex.syntax +136 -136
  75. data/lib/code_rippa/syntax/lighttpd.syntax +31 -31
  76. data/lib/code_rippa/syntax/lilypond.syntax +246 -337
  77. data/lib/code_rippa/syntax/lisp.syntax +32 -32
  78. data/lib/code_rippa/syntax/literate_haskell.syntax +12 -12
  79. data/lib/code_rippa/syntax/logo.syntax +13 -14
  80. data/lib/code_rippa/syntax/logtalk.syntax +81 -81
  81. data/lib/code_rippa/syntax/lua.syntax +50 -48
  82. data/lib/code_rippa/syntax/m.syntax +78 -78
  83. data/lib/code_rippa/syntax/macports_portfile.syntax +98 -97
  84. data/lib/code_rippa/syntax/makefile.syntax +19 -19
  85. data/lib/code_rippa/syntax/man.syntax +9 -9
  86. data/lib/code_rippa/syntax/mediawiki.syntax +311 -401
  87. data/lib/code_rippa/syntax/mips.syntax +34 -34
  88. data/lib/code_rippa/syntax/mod_perl.syntax +25 -31
  89. data/lib/code_rippa/syntax/modula-3.syntax +24 -24
  90. data/lib/code_rippa/syntax/moinmoin.syntax +102 -102
  91. data/lib/code_rippa/syntax/mootools.syntax +283 -300
  92. data/lib/code_rippa/syntax/movable_type.syntax +91 -90
  93. data/lib/code_rippa/syntax/multimarkdown.syntax +19 -30
  94. data/lib/code_rippa/syntax/objective-c++.syntax +6 -10
  95. data/lib/code_rippa/syntax/objective-c.syntax +134 -138
  96. data/lib/code_rippa/syntax/ocaml.syntax +455 -453
  97. data/lib/code_rippa/syntax/ocamllex.syntax +94 -93
  98. data/lib/code_rippa/syntax/ocamlyacc.syntax +98 -98
  99. data/lib/code_rippa/syntax/opengl.syntax +6 -6
  100. data/lib/code_rippa/syntax/pascal.syntax +43 -42
  101. data/lib/code_rippa/syntax/perl.syntax +612 -615
  102. data/lib/code_rippa/syntax/plain_text.syntax +17 -20
  103. data/lib/code_rippa/syntax/postscript.syntax +71 -69
  104. data/lib/code_rippa/syntax/processing.syntax +60 -60
  105. data/lib/code_rippa/syntax/prolog.syntax +17 -20
  106. data/lib/code_rippa/syntax/property_list.syntax +338 -359
  107. data/lib/code_rippa/syntax/python.syntax +487 -509
  108. data/lib/code_rippa/syntax/python_django.syntax +9 -10
  109. data/lib/code_rippa/syntax/qmake_project.syntax +67 -67
  110. data/lib/code_rippa/syntax/qt_c++.syntax +12 -15
  111. data/lib/code_rippa/syntax/quake3_config.syntax +18 -17
  112. data/lib/code_rippa/syntax/r.syntax +42 -42
  113. data/lib/code_rippa/syntax/r_console.syntax +7 -8
  114. data/lib/code_rippa/syntax/ragel.syntax +109 -115
  115. data/lib/code_rippa/syntax/rd_r_documentation.syntax +53 -53
  116. data/lib/code_rippa/syntax/regexp.syntax +26 -26
  117. data/lib/code_rippa/syntax/release_notes.syntax +46 -26
  118. data/lib/code_rippa/syntax/remind.syntax +146 -146
  119. data/lib/code_rippa/syntax/restructuredtext.syntax +132 -131
  120. data/lib/code_rippa/syntax/rez.syntax +46 -45
  121. data/lib/code_rippa/syntax/ruby.syntax +533 -601
  122. data/lib/code_rippa/syntax/ruby_experimental.syntax +82 -100
  123. data/lib/code_rippa/syntax/ruby_on_rails.syntax +56 -68
  124. data/lib/code_rippa/syntax/s5.syntax +35 -51
  125. data/lib/code_rippa/syntax/scheme.syntax +162 -260
  126. data/lib/code_rippa/syntax/scilab.syntax +18 -18
  127. data/lib/code_rippa/syntax/setext.syntax +82 -82
  128. data/lib/code_rippa/syntax/shell-unix-generic.syntax +227 -226
  129. data/lib/code_rippa/syntax/slate.syntax +91 -91
  130. data/lib/code_rippa/syntax/sql.syntax +137 -139
  131. data/lib/code_rippa/syntax/sql_rails.syntax +8 -8
  132. data/lib/code_rippa/syntax/ssh-config.syntax +17 -17
  133. data/lib/code_rippa/syntax/standard_ml.syntax +67 -69
  134. data/lib/code_rippa/syntax/strings_file.syntax +20 -23
  135. data/lib/code_rippa/syntax/subversion_commit_message.syntax +20 -20
  136. data/lib/code_rippa/syntax/sweave.syntax +45 -45
  137. data/lib/code_rippa/syntax/swig.syntax +34 -33
  138. data/lib/code_rippa/syntax/tcl.syntax +87 -86
  139. data/lib/code_rippa/syntax/template_toolkit.syntax +67 -65
  140. data/lib/code_rippa/syntax/textile.syntax +111 -145
  141. data/lib/code_rippa/syntax/tsv.syntax +31 -33
  142. data/lib/code_rippa/syntax/twiki.syntax +141 -141
  143. data/lib/code_rippa/syntax/txt2tags.syntax +39 -38
  144. data/lib/code_rippa/syntax/vectorscript.syntax +31 -31
  145. data/lib/code_rippa/syntax/xhtml_1.0.syntax +2297 -2296
  146. data/lib/code_rippa/syntax/xml.syntax +95 -95
  147. data/lib/code_rippa/syntax/xml_strict.syntax +49 -50
  148. data/lib/code_rippa/syntax/xsl.syntax +31 -31
  149. data/lib/code_rippa/syntax/yaml.syntax +86 -86
  150. data/lib/code_rippa/syntax/yaml_converter.rb +37 -0
  151. data/lib/code_rippa/syntax/yui_javascript.syntax +88 -88
  152. data/lib/code_rippa/version.rb +2 -2
  153. data/test/fixtures/hello.rb +5 -3
  154. data/test/test_private_methods.rb +40 -40
  155. data/test/test_public_methods.rb +9 -18
  156. metadata +61 -63
@@ -1,659 +1,660 @@
1
- ---
1
+ ---
2
2
  name: OCaml
3
- fileTypes:
3
+ fileTypes:
4
4
  - ml
5
5
  - mli
6
6
  scopeName: source.ocaml
7
- repository:
8
- moduleref:
9
- patterns:
7
+ repository:
8
+ moduleref:
9
+ patterns:
10
10
  - name: meta.module-reference.ocaml
11
- beginCaptures:
12
- "1":
11
+ beginCaptures:
12
+ '1':
13
13
  name: support.other.module.ocaml
14
- "2":
14
+ '2':
15
15
  name: punctuation.separator.module-reference.ocaml
16
- match: \b([A-Z][a-zA-Z0-9'_]*)(\.)
17
- variables:
18
- patterns:
16
+ match: "\\b([A-Z][a-zA-Z0-9'_]*)(\\.)"
17
+ variables:
18
+ patterns:
19
19
  - name: variable.parameter.unit.ocaml
20
- match: \(\)
20
+ match: "\\(\\)"
21
21
  - include: "#constants"
22
22
  - include: "#moduleref"
23
23
  - name: variable.parameter.labeled.ocaml
24
- begin: (~)([a-z][a-zA-Z0-9'_]*)(\s*:\s*)?
25
- beginCaptures:
26
- "1":
24
+ begin: "(~)([a-z][a-zA-Z0-9'_]*)(\\s*:\\s*)?"
25
+ beginCaptures:
26
+ '1':
27
27
  name: punctuation.definition.labeled-parameter.ocaml
28
- "2":
28
+ '2':
29
29
  name: entity.name.tag.label.ocaml
30
- "3":
30
+ '3':
31
31
  name: punctuation.separator.label.ocaml
32
- end: \s
33
- patterns:
32
+ end: "\\s"
33
+ patterns:
34
34
  - include: "#variables"
35
35
  - name: variable.parameter.optional.ocaml
36
- captures:
37
- "1":
36
+ captures:
37
+ '1':
38
38
  name: punctuation.definition.optional-parameter.ocaml
39
- "2":
39
+ '2':
40
40
  name: entity.name.tag.label.optional.ocaml
41
- match: (\?)([a-z][a-zA-Z0-9_]*)
41
+ match: "(\\?)([a-z][a-zA-Z0-9_]*)"
42
42
  - name: variable.parameter.optional.ocaml
43
- endCaptures:
44
- "1":
43
+ endCaptures:
44
+ '1':
45
45
  name: punctuation.definition.optional-parameter.ocaml
46
- begin: (\?)(\()([a-z_][a-zA-Z0-9'_]*)\s*(=)
47
- beginCaptures:
48
- "1":
46
+ begin: "(\\?)(\\()([a-z_][a-zA-Z0-9'_]*)\\s*(=)"
47
+ beginCaptures:
48
+ '1':
49
49
  name: punctuation.definition.optional-parameter.ocaml
50
- "2":
50
+ '2':
51
51
  name: punctuation.definition.optional-parameter.ocaml
52
- "3":
52
+ '3':
53
53
  name: entity.name.tag.label.optional.ocaml
54
- "4":
54
+ '4':
55
55
  name: punctuation.separator.optional-parameter-assignment.ocaml
56
- end: (\))
57
- patterns:
58
- - include: $self
56
+ end: "(\\))"
57
+ patterns:
58
+ - include: "$self"
59
59
  - name: meta.parameter.type-constrained.ocaml
60
- endCaptures:
61
- "1":
60
+ endCaptures:
61
+ '1':
62
62
  name: punctuation.section.type-constraint.ocaml
63
- begin: (\()(?=(~[a-z][a-zA-Z0-9_]*:|("(\\"|[^"])*")|[^\(\)~"])+(?<!:)(:>|:(?![:=])))
64
- beginCaptures:
65
- "1":
63
+ begin: "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?<!:)(:>|:(?![:=])))"
64
+ beginCaptures:
65
+ '1':
66
66
  name: punctuation.section.type-constraint.ocaml
67
- end: (\))
68
- patterns:
67
+ end: "(\\))"
68
+ patterns:
69
69
  - name: storage.type.ocaml
70
- begin: (?<!:)(:>|:(?![:=]))
71
- beginCaptures:
72
- "1":
70
+ begin: "(?<!:)(:>|:(?![:=]))"
71
+ beginCaptures:
72
+ '1':
73
73
  name: punctuation.separator.type-constraint.ocaml
74
- end: (?=\))
75
- patterns:
74
+ end: "(?=\\))"
75
+ patterns:
76
76
  - name: meta.paren.group
77
- begin: \(
78
- end: \)
77
+ begin: "\\("
78
+ end: "\\)"
79
79
  - include: "#variables"
80
80
  - include: "#comments"
81
81
  - name: meta.paren-group.ocaml
82
- begin: \(
83
- end: \)
84
- patterns:
82
+ begin: "\\("
83
+ end: "\\)"
84
+ patterns:
85
85
  - include: "#variables"
86
86
  - name: variable.parameter.tuple.ocaml
87
- endCaptures:
88
- "1":
87
+ endCaptures:
88
+ '1':
89
89
  name: punctuation.definition.tuple.ocaml
90
- begin: (\()
91
- beginCaptures:
92
- "1":
90
+ begin: "(\\()"
91
+ beginCaptures:
92
+ '1':
93
93
  name: punctuation.definition.tuple.ocaml
94
- end: (\))
95
- patterns:
94
+ end: "(\\))"
95
+ patterns:
96
96
  - include: "#matchpatterns"
97
97
  - include: "#variables"
98
98
  - name: punctuation.separator.tuple.ocaml
99
99
  match: ","
100
100
  - name: variable.parameter.record.ocaml
101
- endCaptures:
102
- "1":
101
+ endCaptures:
102
+ '1':
103
103
  name: punctuation.definition.record.ocaml
104
- begin: (\{)
105
- beginCaptures:
106
- "1":
104
+ begin: "(\\{)"
105
+ beginCaptures:
106
+ '1':
107
107
  name: punctuation.definition.record.ocaml
108
- end: (\})
109
- patterns:
108
+ end: "(\\})"
109
+ patterns:
110
110
  - include: "#moduleref"
111
111
  - name: meta.recordfield.match.ocaml
112
- endCaptures:
113
- "1":
112
+ endCaptures:
113
+ '1':
114
114
  name: punctuation.separator.record.ocaml
115
- begin: \b([a-z][a-zA-Z0-9'_]*)\s*(=)
116
- beginCaptures:
117
- "1":
115
+ begin: "\\b([a-z][a-zA-Z0-9'_]*)\\s*(=)"
116
+ beginCaptures:
117
+ '1':
118
118
  name: entity.name.tag.record.ocaml
119
- "2":
119
+ '2':
120
120
  name: punctuation.separator.record.field-assignment.ocaml
121
- end: (;)|(?=\})
122
- patterns:
121
+ end: "(;)|(?=\\})"
122
+ patterns:
123
123
  - include: "#matchpatterns"
124
124
  - include: "#storagetypes"
125
125
  - name: variable.parameter.ocaml
126
- match: \b[a-z_][a-zA-Z0-9'_]*
127
- typedefs:
128
- patterns:
126
+ match: "\\b[a-z_][a-zA-Z0-9'_]*"
127
+ typedefs:
128
+ patterns:
129
129
  - name: punctuation.separator.variant-definition.ocaml
130
- match: \|
130
+ match: "\\|"
131
131
  - include: "#comments"
132
132
  - name: meta.paren-group.ocaml
133
- begin: \(
134
- end: \)
135
- patterns:
133
+ begin: "\\("
134
+ end: "\\)"
135
+ patterns:
136
136
  - include: "#typedefs"
137
137
  - name: keyword.other.ocaml
138
- match: \bof\b
138
+ match: "\\bof\\b"
139
139
  - include: "#storagetypes"
140
140
  - name: storage.type.ocaml
141
- match: (?<=\s|\()['a-z_][a-zA-Z0-9_]*\b
141
+ match: "(?<=\\s|\\()['a-z_][a-zA-Z0-9_]*\\b"
142
142
  - name: meta.module.type.ocaml
143
- captures:
144
- "1":
143
+ captures:
144
+ '1':
145
145
  name: support.other.module.ocaml
146
- "2":
146
+ '2':
147
147
  name: storage.type.module.ocaml
148
- match: \b((?:[A-Z][a-zA-Z0-9'_]*)(?:\.[A-Z][a-zA-Z0-9'_]+)*)(\.[a-zA-Z0-9'_]+)
148
+ match: "\\b((?:[A-Z][a-zA-Z0-9'_]*)(?:\\.[A-Z][a-zA-Z0-9'_]+)*)(\\.[a-zA-Z0-9'_]+)"
149
149
  - name: meta.polymorphic-variant.definition.ocaml
150
- endCaptures:
151
- "1":
150
+ endCaptures:
151
+ '1':
152
152
  name: punctuation.definition.polymorphic-variant.ocaml
153
- begin: (\[(>|<)?)
154
- beginCaptures:
155
- "1":
153
+ begin: "(\\[(>|<)?)"
154
+ beginCaptures:
155
+ '1':
156
156
  name: punctuation.definition.polymorphic-variant.ocaml
157
- end: (\])
158
- patterns:
157
+ end: "(\\])"
158
+ patterns:
159
159
  - include: "#typedefs"
160
- - include: $self
160
+ - include: "$self"
161
161
  - name: punctuation.separator.algebraic-type.ocaml
162
- match: \|
163
- storagetypes:
164
- patterns:
162
+ match: "\\|"
163
+ storagetypes:
164
+ patterns:
165
165
  - name: storage.type.ocaml
166
- match: \b(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)\b
166
+ match: "\\b(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)\\b"
167
167
  - name: storage.type.variant.polymorphic.ocaml
168
168
  match: "#[a-z_][a-zA-Z0-9_]*"
169
- module-signature:
170
- patterns:
169
+ module-signature:
170
+ patterns:
171
171
  - name: meta.module.signature.val.ocaml
172
- begin: (val)\s+([a-z_][a-zA-Z0-9_']*)\s*(:)
173
- beginCaptures:
174
- "1":
172
+ begin: "(val)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)"
173
+ beginCaptures:
174
+ '1':
175
175
  name: keyword.other.ocaml
176
- "2":
176
+ '2':
177
177
  name: entity.name.type.value-signature.ocaml
178
- "3":
178
+ '3':
179
179
  name: punctuation.separator.type-constraint.ocaml
180
- end: (?=\b(type|val|external|class|module|end)\b)|^\s*$
181
- patterns:
180
+ end: "(?=\\b(type|val|external|class|module|end)\\b)|^\\s*$"
181
+ patterns:
182
182
  - name: variable.parameter.optional.ocaml
183
- captures:
184
- "1":
183
+ captures:
184
+ '1':
185
185
  name: punctuation.definition.optional-parameter.ocaml
186
- "2":
186
+ '2':
187
187
  name: entity.name.tag.label.optional.ocaml
188
- "3":
188
+ '3':
189
189
  name: punctuation.separator.optional-parameter.ocaml
190
- match: (\?)([a-z][a-zA-Z0-9_]*)\s*(:)
190
+ match: "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)"
191
191
  - name: variable.parameter.labeled.ocaml
192
- begin: (~)([a-z][a-zA-Z0-9'_]*)\s*(:)\s*
193
- beginCaptures:
194
- "1":
192
+ begin: "(~)([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*"
193
+ beginCaptures:
194
+ '1':
195
195
  name: punctuation.definition.labeled-parameter.ocaml
196
- "2":
196
+ '2':
197
197
  name: entity.name.tag.label.ocaml
198
- "3":
198
+ '3':
199
199
  name: punctuation.separator.label.ocaml
200
- end: \s
201
- patterns:
200
+ end: "\\s"
201
+ patterns:
202
202
  - include: "#variables"
203
203
  - include: "#typedefs"
204
204
  - name: meta.module.signature.external.ocaml
205
- begin: (external)\s+([a-z_][a-zA-Z0-9_']*)\s*(:)
206
- beginCaptures:
207
- "1":
205
+ begin: "(external)\\s+([a-z_][a-zA-Z0-9_']*)\\s*(:)"
206
+ beginCaptures:
207
+ '1':
208
208
  name: keyword.other.ocaml
209
- "2":
209
+ '2':
210
210
  name: entity.name.type.external-signature.ocaml
211
- "3":
211
+ '3':
212
212
  name: punctuation.separator.type-constraint.ocaml
213
- end: (?=\b(type|val|external|class|module|end)\b)|^\s*$
214
- patterns:
213
+ end: "(?=\\b(type|val|external|class|module|end)\\b)|^\\s*$"
214
+ patterns:
215
215
  - name: variable.parameter.optional.ocaml
216
- captures:
217
- "1":
216
+ captures:
217
+ '1':
218
218
  name: punctuation.definition.optional-parameter.ocaml
219
- "2":
219
+ '2':
220
220
  name: entity.name.tag.label.optional.ocaml
221
- "3":
221
+ '3':
222
222
  name: punctuation.separator.optional-parameter.ocaml
223
- match: (\?)([a-z][a-zA-Z0-9_]*)\s*(:)
223
+ match: "(\\?)([a-z][a-zA-Z0-9_]*)\\s*(:)"
224
224
  - name: variable.parameter.labeled.ocaml
225
- begin: (~)([a-z][a-zA-Z0-9'_]*)\s*(:)\s*
226
- beginCaptures:
227
- "1":
225
+ begin: "(~)([a-z][a-zA-Z0-9'_]*)\\s*(:)\\s*"
226
+ beginCaptures:
227
+ '1':
228
228
  name: punctuation.definition.labeled-parameter.ocaml
229
- "2":
229
+ '2':
230
230
  name: entity.name.tag.label.ocaml
231
- "3":
231
+ '3':
232
232
  name: punctuation.separator.label.ocaml
233
- end: \s
234
- patterns:
233
+ end: "\\s"
234
+ patterns:
235
235
  - include: "#variables"
236
236
  - include: "#strings"
237
237
  - include: "#typedefs"
238
- matchpatterns:
239
- patterns:
238
+ matchpatterns:
239
+ patterns:
240
240
  - name: constant.language.universal-match.ocaml
241
- match: \b_\b
241
+ match: "\\b_\\b"
242
242
  - name: punctuation.separator.match-pattern.ocaml
243
- match: \|(?=\s*\S)
243
+ match: "\\|(?=\\s*\\S)"
244
244
  - name: meta.match-option.ocaml
245
- endCaptures:
246
- "1":
245
+ endCaptures:
246
+ '1':
247
247
  name: punctuation.definition.match-option.ocaml
248
- begin: (\()(?=(?!=.*?->).*?\|)
249
- beginCaptures:
250
- "1":
248
+ begin: "(\\()(?=(?!=.*?->).*?\\|)"
249
+ beginCaptures:
250
+ '1':
251
251
  name: punctuation.definition.match-option.ocaml
252
- end: (\))
253
- patterns:
252
+ end: "(\\))"
253
+ patterns:
254
254
  - name: punctuation.separator.match-option.ocaml
255
- match: \|
255
+ match: "\\|"
256
256
  - include: "#matchpatterns"
257
257
  - include: "#moduleref"
258
258
  - include: "#constants"
259
259
  - include: "#variables"
260
- - include: $self
261
- comments:
262
- patterns:
260
+ - include: "$self"
261
+ comments:
262
+ patterns:
263
263
  - name: comment.block.ocaml
264
- captures:
265
- "1":
264
+ captures:
265
+ '1':
266
266
  name: comment.block.empty.ocaml
267
- match: \(\*\*?(\*)\)
267
+ match: "\\(\\*\\*?(\\*)\\)"
268
268
  - name: comment.block.ocaml
269
- begin: \(\*
270
- end: \*\)
271
- patterns:
269
+ begin: "\\(\\*"
270
+ end: "\\*\\)"
271
+ patterns:
272
272
  - include: "#comments"
273
273
  - name: comment.block.ocamlyacc
274
- begin: /\*
275
- end: \*/
276
- patterns:
274
+ begin: "/\\*"
275
+ end: "\\*/"
276
+ patterns:
277
277
  - include: "#comments"
278
278
  - name: comment.block.string.quoted.double.ocaml
279
- begin: (?=[^\\])(")
279
+ begin: "(?=[^\\\\])(\")"
280
280
  end: "\""
281
- patterns:
281
+ patterns:
282
282
  - name: comment.block.string.constant.character.escape.ocaml
283
- match: \\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\d\d|[bnrt'"\\])
284
- lists:
285
- patterns:
283
+ match: "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"
284
+ lists:
285
+ patterns:
286
286
  - name: meta.list.ocaml
287
- endCaptures:
288
- "1":
287
+ endCaptures:
288
+ '1':
289
289
  name: punctuation.definition.list.end.ocaml
290
- begin: (\[)(?!\||<|>)
291
- beginCaptures:
292
- "1":
290
+ begin: "(\\[)(?!\\||<|>)"
291
+ beginCaptures:
292
+ '1':
293
293
  name: punctuation.definition.list.begin.ocaml
294
- end: (?<!\||>)(])
295
- patterns:
294
+ end: "(?<!\\||>)(])"
295
+ patterns:
296
296
  - include: "#lists"
297
- - include: $self
298
- strings:
299
- patterns:
297
+ - include: "$self"
298
+ strings:
299
+ patterns:
300
300
  - name: string.quoted.double.ocaml
301
- endCaptures:
302
- "1":
301
+ endCaptures:
302
+ '1':
303
303
  name: punctuation.definition.string.end.ocaml
304
- begin: (?=[^\\])(")
305
- beginCaptures:
306
- "1":
304
+ begin: "(?=[^\\\\])(\")"
305
+ beginCaptures:
306
+ '1':
307
307
  name: punctuation.definition.string.begin.ocaml
308
- end: (")
309
- patterns:
308
+ end: "(\")"
309
+ patterns:
310
310
  - name: punctuation.separator.string.ignore-eol.ocaml
311
- match: \\$[ \t]*
311
+ match: "\\\\$[ \\t]*"
312
312
  - name: constant.character.string.escape.ocaml
313
- match: \\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\d\d|[bnrt'"\\])
313
+ match: "\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\])"
314
314
  - name: constant.character.regexp.escape.ocaml
315
- match: \\[\|\(\)1-9$^.*+?\[\]]
315
+ match: "\\\\[\\|\\(\\)1-9$^.*+?\\[\\]]"
316
316
  - name: invalid.illegal.character.string.escape
317
- match: \\(?!(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\d\d|[bnrt'"\\]|[\|\(\)1-9$^.*+?\[\]]|$[ \t]*))(?:.)
318
- constants:
319
- patterns:
317
+ match: "\\\\(?!(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]|[\\|\\(\\)1-9$^.*+?\\[\\]]|$[
318
+ \\t]*))(?:.)"
319
+ constants:
320
+ patterns:
320
321
  - name: constant.language.pseudo-variable.ocaml
321
- captures:
322
- "1":
322
+ captures:
323
+ '1':
323
324
  name: meta.empty-typing-pair.ocaml
324
- "2":
325
+ '2':
325
326
  name: meta.empty-typing-pair.parens.ocaml
326
- "3":
327
+ '3':
327
328
  name: meta.empty-typing-pair.ocaml
328
- match: (?:\[\s*(\])|\((\))|\(\s*(\)))
329
+ match: "(?:\\[\\s*(\\])|\\((\\))|\\(\\s*(\\)))"
329
330
  - name: constant.language.boolean.ocaml
330
- match: \b(true|false)\b
331
+ match: "\\b(true|false)\\b"
331
332
  - name: constant.numeric.floating-point.ocaml
332
- match: \b-?[0-9][0-9_]*((\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))
333
+ match: "\\b-?[0-9][0-9_]*((\\.([0-9][0-9_]*([eE][+-]??[0-9][0-9_]*)?)?)|([eE][+-]??[0-9][0-9_]*))"
333
334
  - name: constant.numeric.integer.nativeint.ocaml
334
- match: \b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))n
335
+ match: "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))n"
335
336
  - name: constant.numeric.integer.int64.ocaml
336
- match: \b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))L
337
+ match: "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))L"
337
338
  - name: constant.numeric.integer.int32.ocaml
338
- match: \b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))l
339
+ match: "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))l"
339
340
  - name: constant.numeric.integer.ocaml
340
- match: \b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))
341
+ match: "\\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))"
341
342
  - name: constant.character.ocaml
342
343
  match: "'(.|\\\\(x[a-fA-F0-9][a-fA-F0-9]|[0-2]\\d\\d|[bnrt'\"\\\\]))'"
343
- arrays:
344
- patterns:
344
+ arrays:
345
+ patterns:
345
346
  - name: meta.array.ocaml
346
- endCaptures:
347
- "1":
347
+ endCaptures:
348
+ '1':
348
349
  name: punctuation.definition.array.end.ocaml
349
- begin: (\[\|)
350
- beginCaptures:
351
- "1":
350
+ begin: "(\\[\\|)"
351
+ beginCaptures:
352
+ '1':
352
353
  name: punctuation.definition.array.begin.ocaml
353
- end: (\|])
354
- patterns:
354
+ end: "(\\|])"
355
+ patterns:
355
356
  - include: "#arrays"
356
- - include: $self
357
+ - include: "$self"
357
358
  uuid: F816FA69-6EE8-11D9-BF2D-000D93589AF6
358
- foldingStartMarker: (\b(module|class|)\s.*?=\s*$|\bbegin|sig|struct|(object(\s*\(_?[a-z]+\))?)\s*$|\bwhile\s.*?\bdo\s*$|^let(?:\s+rec)?\s+[a-z_][a-zA-Z0-9_]*\s+(?!=)\S)
359
- patterns:
359
+ foldingStartMarker: "(\\b(module|class|)\\s.*?=\\s*$|\\bbegin|sig|struct|(object(\\s*\\(_?[a-z]+\\))?)\\s*$|\\bwhile\\s.*?\\bdo\\s*$|^let(?:\\s+rec)?\\s+[a-z_][a-zA-Z0-9_]*\\s+(?!=)\\S)"
360
+ patterns:
360
361
  - name: meta.module.binding
361
- captures:
362
- "1":
362
+ captures:
363
+ '1':
363
364
  name: keyword.other.module-binding.ocaml
364
- "2":
365
+ '2':
365
366
  name: keyword.other.module-definition.ocaml
366
- "3":
367
+ '3':
367
368
  name: support.other.module.ocaml
368
- "4":
369
+ '4':
369
370
  name: punctuation.separator.module-binding.ocmal
370
- match: \b(let)\s+(module)\s+([A-Z][a-zA-Z0-9'_]*)\s*(=)
371
+ match: "\\b(let)\\s+(module)\\s+([A-Z][a-zA-Z0-9'_]*)\\s*(=)"
371
372
  - name: meta.function.ocaml
372
- endCaptures:
373
- "1":
373
+ endCaptures:
374
+ '1':
374
375
  name: punctuation.separator.function.type-constraint.ocaml
375
- "2":
376
+ '2':
376
377
  name: storage.type.ocaml
377
- "3":
378
+ '3':
378
379
  name: keyword.operator.ocaml
379
- "4":
380
+ '4':
380
381
  name: keyword.operator.ocaml
381
- begin: \b(let|and)\s+(?!\(\*)((rec\s+)([a-z_][a-zA-Z0-9_']*)\b|([a-z_][a-zA-Z0-9_']*|\([^)]+\))(?=\s)((?=\s*=\s*(?=fun(?:ction)\b))|(?!\s*=)))
382
- beginCaptures:
383
- "1":
382
+ begin: "\\b(let|and)\\s+(?!\\(\\*)((rec\\s+)([a-z_][a-zA-Z0-9_']*)\\b|([a-z_][a-zA-Z0-9_']*|\\([^)]+\\))(?=\\s)((?=\\s*=\\s*(?=fun(?:ction)\\b))|(?!\\s*=)))"
383
+ beginCaptures:
384
+ '1':
384
385
  name: keyword.other.function-definition.ocaml
385
- "3":
386
+ '3':
386
387
  name: keyword.other.funtion-definition.ocaml
387
- "4":
388
+ '4':
388
389
  name: entity.name.function.ocaml
389
- "5":
390
+ '5':
390
391
  name: entity.name.function.ocaml
391
- end: (?:(:)\s*([^=]+))?(?:(=)|(=)\s*(?=fun(?:ction)\b))
392
- patterns:
392
+ end: "(?:(:)\\s*([^=]+))?(?:(=)|(=)\\s*(?=fun(?:ction)\\b))"
393
+ patterns:
393
394
  - include: "#variables"
394
395
  - name: meta.function.anonymous.ocaml
395
- endCaptures:
396
- "1":
396
+ endCaptures:
397
+ '1':
397
398
  name: punctuation.definition.function.anonymous.ocaml
398
- begin: (\()(?=fun\s)
399
- beginCaptures:
400
- "1":
399
+ begin: "(\\()(?=fun\\s)"
400
+ beginCaptures:
401
+ '1':
401
402
  name: punctuation.definition.function.anonymous.ocaml
402
- end: (\))
403
- patterns:
403
+ end: "(\\))"
404
+ patterns:
404
405
  - name: meta.function.anonymous.definition.ocaml
405
- endCaptures:
406
- "1":
406
+ endCaptures:
407
+ '1':
407
408
  name: punctuation.separator.function-definition.ocaml
408
- begin: (?<=\()(fun)\s
409
- beginCaptures:
410
- "1":
409
+ begin: "(?<=\\()(fun)\\s"
410
+ beginCaptures:
411
+ '1':
411
412
  name: keyword.other.function-definition.ocaml
412
- end: (->)
413
- patterns:
413
+ end: "(->)"
414
+ patterns:
414
415
  - include: "#variables"
415
- - include: $self
416
+ - include: "$self"
416
417
  - name: meta.type-definition-group.ocaml
417
- begin: ^\s*(?=type\s)
418
- end: \b(?=let|end)|^\s*$
419
- patterns:
418
+ begin: "^\\s*(?=type\\s)"
419
+ end: "\\b(?=let|end)|^\\s*$"
420
+ patterns:
420
421
  - name: meta.type-definition.ocaml
421
- begin: \b(type|and)\s+([^=]*)(=)?
422
- beginCaptures:
423
- "1":
422
+ begin: "\\b(type|and)\\s+([^=]*)(=)?"
423
+ beginCaptures:
424
+ '1':
424
425
  name: keyword.other.type-definition.ocaml
425
- "2":
426
+ '2':
426
427
  name: storage.type.user-defined.ocaml
427
- "3":
428
+ '3':
428
429
  name: punctuation.separator.type-definition.ocaml
429
- end: (?=\b(type|and|let|end)\b)|(?=^\s*$)
430
- patterns:
430
+ end: "(?=\\b(type|and|let|end)\\b)|(?=^\\s*$)"
431
+ patterns:
431
432
  - include: "#typedefs"
432
433
  - name: meta.pattern-match.ocaml
433
- endCaptures:
434
- "1":
434
+ endCaptures:
435
+ '1':
435
436
  name: punctuation.separator.match-definition.ocaml
436
- "2":
437
+ '2':
437
438
  name: keyword.control.match-condition.ocaml
438
- begin: \b(with|function)(?=(\s*$|.*->))\b|((?<!\|)(\|)(?!\|)(?=.*->))
439
- beginCaptures:
440
- "1":
439
+ begin: "\\b(with|function)(?=(\\s*$|.*->))\\b|((?<!\\|)(\\|)(?!\\|)(?=.*->))"
440
+ beginCaptures:
441
+ '1':
441
442
  name: keyword.control.match-definition.ocaml
442
- "2":
443
+ '2':
443
444
  name: keyword.other.function-definition.ocaml
444
- "3":
445
+ '3':
445
446
  name: keyword.control.match-definition.ocaml
446
- end: (?:(->)|\b(when)\b|\s(?=\|))
447
- patterns:
447
+ end: "(?:(->)|\\b(when)\\b|\\s(?=\\|))"
448
+ patterns:
448
449
  - include: "#matchpatterns"
449
450
  - name: meta.class.type-definition.ocaml
450
- captures:
451
- "1":
451
+ captures:
452
+ '1':
452
453
  name: keyword.other.class-type-definition.ocaml
453
- "2":
454
+ '2':
454
455
  name: entity.name.type.class-type.ocaml
455
- "4":
456
+ '4':
456
457
  name: storage.type.user-defined.ocaml
457
- match: ^[ \t]*(class\s+type\s+)((\[\s*('[A-Za-z][a-zA-Z0-9_']*(?:\s*,\s*'[A-Za-z][a-zA-Z0-9_']*)*)\s*\]\s+)?[a-z_][a-zA-Z0-9'_]*)
458
+ match: "^[ \\t]*(class\\s+type\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)"
458
459
  - name: meta.class.ocaml
459
- endCaptures:
460
- "1":
460
+ endCaptures:
461
+ '1':
461
462
  name: keyword.operator.ocaml
462
- begin: ^[ \t]*(class)(?:\s+(?!(?:virtual)\s+))((\[\s*('[A-Za-z][a-zA-Z0-9_']*(?:\s*,\s*'[A-Za-z][a-zA-Z0-9_']*)*)\s*\]\s+)?[a-z_][a-zA-Z0-9'_]*)
463
- beginCaptures:
464
- "1":
463
+ begin: "^[ \\t]*(class)(?:\\s+(?!(?:virtual)\\s+))((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)"
464
+ beginCaptures:
465
+ '1':
465
466
  name: keyword.other.class-definition.ocaml
466
- "2":
467
+ '2':
467
468
  name: entity.name.type.class.ocaml
468
- "4":
469
+ '4':
469
470
  name: storage.type.user-defined.ocaml
470
- end: (=)
471
- patterns:
471
+ end: "(=)"
472
+ patterns:
472
473
  - include: "#variables"
473
474
  - name: meta.class.virtual.ocaml
474
- endCaptures:
475
- "1":
475
+ endCaptures:
476
+ '1':
476
477
  name: keyword.operator.ocaml
477
- begin: ^[ \t]*(class\s+virtual\s+)((\[\s*('[A-Za-z][a-zA-Z0-9_']*(?:\s*,\s*'[A-Za-z][a-zA-Z0-9_']*)*)\s*\]\s+)?[a-z_][a-zA-Z0-9'_]*)
478
- beginCaptures:
479
- "1":
478
+ begin: "^[ \\t]*(class\\s+virtual\\s+)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)"
479
+ beginCaptures:
480
+ '1':
480
481
  name: keyword.other.class-definition.ocaml
481
- "2":
482
+ '2':
482
483
  name: entity.name.type.class.ocaml
483
- "4":
484
+ '4':
484
485
  name: storage.type.user-defined.ocaml
485
- end: (=)
486
- patterns:
486
+ end: "(=)"
487
+ patterns:
487
488
  - include: "#variables"
488
489
  - name: meta.class.virtual.type-definition.ocaml
489
- captures:
490
- "1":
490
+ captures:
491
+ '1':
491
492
  name: keyword.other.class-type-definition.ocaml
492
- "2":
493
+ '2':
493
494
  name: entity.name.type.class-type.ocaml
494
- "4":
495
+ '4':
495
496
  name: storage.type.user-defined.ocaml
496
- match: ^[ \t]*(class\s+type\s+virtual)((\[\s*('[A-Za-z][a-zA-Z0-9_']*(?:\s*,\s*'[A-Za-z][a-zA-Z0-9_']*)*)\s*\]\s+)?[a-z_][a-zA-Z0-9'_]*)
497
+ match: "^[ \\t]*(class\\s+type\\s+virtual)((\\[\\s*('[A-Za-z][a-zA-Z0-9_']*(?:\\s*,\\s*'[A-Za-z][a-zA-Z0-9_']*)*)\\s*\\]\\s+)?[a-z_][a-zA-Z0-9'_]*)"
497
498
  - name: meta.record.ocaml
498
- endCaptures:
499
- "1":
499
+ endCaptures:
500
+ '1':
500
501
  name: punctuation.definition.record.ocaml
501
- begin: (\{)
502
- beginCaptures:
503
- "1":
502
+ begin: "(\\{)"
503
+ beginCaptures:
504
+ '1':
504
505
  name: punctuation.definition.record.ocaml
505
- end: (\})
506
- patterns:
506
+ end: "(\\})"
507
+ patterns:
507
508
  - name: keyword.other.language.ocaml
508
- match: \bwith\b
509
+ match: "\\bwith\\b"
509
510
  - name: meta.record.definition.ocaml
510
- endCaptures:
511
- "1":
511
+ endCaptures:
512
+ '1':
512
513
  name: keyword.operator.ocaml
513
- begin: (\bmutable\s+)?\b([a-z_][a-zA-Z0-9_']*)\s*(:)
514
- beginCaptures:
515
- "1":
514
+ begin: "(\\bmutable\\s+)?\\b([a-z_][a-zA-Z0-9_']*)\\s*(:)"
515
+ beginCaptures:
516
+ '1':
516
517
  name: keyword.other.storage.modifier.ocaml
517
- "2":
518
+ '2':
518
519
  name: source.ocaml
519
- "3":
520
+ '3':
520
521
  name: punctuation.definition.record.ocaml
521
- end: (;|(?=}))
522
- patterns:
522
+ end: "(;|(?=}))"
523
+ patterns:
523
524
  - include: "#typedefs"
524
- - include: $self
525
+ - include: "$self"
525
526
  - name: meta.object.ocaml
526
- endCaptures:
527
- "1":
527
+ endCaptures:
528
+ '1':
528
529
  name: keyword.control.object.ocaml
529
- "2":
530
+ '2':
530
531
  name: punctuation.terminator.expression.ocaml
531
- begin: \b(object)\s*(?:(\()(_?[a-z]+)(\)))?\s*$
532
- beginCaptures:
533
- "1":
532
+ begin: "\\b(object)\\s*(?:(\\()(_?[a-z]+)(\\)))?\\s*$"
533
+ beginCaptures:
534
+ '1':
534
535
  name: keyword.other.object-definition.ocaml
535
- "2":
536
+ '2':
536
537
  name: punctuation.definition.self-binding.ocaml
537
- "3":
538
+ '3':
538
539
  name: entity.name.type.self-binding.ocaml
539
- "4":
540
+ '4':
540
541
  name: punctuation.definition.self-binding.ocaml
541
- end: \b(end)\b
542
- patterns:
542
+ end: "\\b(end)\\b"
543
+ patterns:
543
544
  - name: meta.method.ocaml
544
- endCaptures:
545
- "1":
545
+ endCaptures:
546
+ '1':
546
547
  name: keyword.operator.ocaml
547
- begin: \b(method)\s+(virtual\s+)?(private\s+)?([a-z_][a-zA-Z0-9'_]*)
548
- beginCaptures:
549
- "1":
548
+ begin: "\\b(method)\\s+(virtual\\s+)?(private\\s+)?([a-z_][a-zA-Z0-9'_]*)"
549
+ beginCaptures:
550
+ '1':
550
551
  name: keyword.other.method-definition.ocaml
551
- "2":
552
+ '2':
552
553
  name: keyword.other.method-definition.ocaml
553
- "3":
554
+ '3':
554
555
  name: keyword.other.method-restriction.ocaml
555
- "4":
556
+ '4':
556
557
  name: entity.name.function.method.ocaml
557
- end: (=|:)
558
- patterns:
558
+ end: "(=|:)"
559
+ patterns:
559
560
  - include: "#variables"
560
561
  - name: meta.object.type-constraint.ocaml
561
- endCaptures:
562
- "1":
562
+ endCaptures:
563
+ '1':
563
564
  name: storage.type.polymorphic-variant.ocaml
564
- "2":
565
+ '2':
565
566
  name: storage.type.ocaml
566
- "3":
567
+ '3':
567
568
  name: storage.type.user-defined.ocaml
568
- begin: (constraint)\s+([a-z_'][a-zA-Z0-9'_]*)\s+(=)
569
- beginCaptures:
570
- "1":
569
+ begin: "(constraint)\\s+([a-z_'][a-zA-Z0-9'_]*)\\s+(=)"
570
+ beginCaptures:
571
+ '1':
571
572
  name: keyword.other.language.ocaml
572
- "2":
573
+ '2':
573
574
  name: storage.type.user-defined.ocaml
574
- "3":
575
+ '3':
575
576
  name: keyword.operator.ocaml
576
- end: (#[a-z_][a-zA-Z0-9'_]*)|(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)|([a-z_][a-zA-Z0-9'_]*)\s*$
577
- - include: $self
577
+ end: "(#[a-z_][a-zA-Z0-9'_]*)|(int|char|float|string|list|array|bool|unit|exn|option|int32|int64|nativeint|format4|lazy_t)|([a-z_][a-zA-Z0-9'_]*)\\s*$"
578
+ - include: "$self"
578
579
  - name: meta.method-call.ocaml
579
- captures:
580
- "1":
580
+ captures:
581
+ '1':
581
582
  name: punctuation.separator.method-call.ocaml
582
- match: (?<=\w|\)|')(#)[a-z_][a-zA-Z0-9'_]*
583
+ match: "(?<=\\w|\\)|')(#)[a-z_][a-zA-Z0-9'_]*"
583
584
  - name: meta.module.ocaml
584
- captures:
585
- "1":
585
+ captures:
586
+ '1':
586
587
  name: keyword.other.module-definition.ocaml
587
- "2":
588
+ '2':
588
589
  name: entity.name.type.module.ocaml
589
- "3":
590
+ '3':
590
591
  name: punctuation.separator.module-definition.ocaml
591
- "4":
592
+ '4':
592
593
  name: entity.name.type.module-type.ocaml
593
- match: ^[ \t]*(module)\s+([A-Z_][a-zA-Z0-9'_]*)(?:\s*(:)\s*([A-Z][a-zA-Z0-9'_]*)?)?
594
+ match: "^[ \\t]*(module)\\s+([A-Z_][a-zA-Z0-9'_]*)(?:\\s*(:)\\s*([A-Z][a-zA-Z0-9'_]*)?)?"
594
595
  - name: meta.module.type.ocaml
595
- captures:
596
- "1":
596
+ captures:
597
+ '1':
597
598
  name: keyword.other.module-type-definition.ocaml
598
- "2":
599
+ '2':
599
600
  name: entity.name.type.module-type.ocaml
600
- match: ^[ \t]*(module\s+type\s+)([A-Z][a-zA-Z0-9'_]*)
601
+ match: "^[ \\t]*(module\\s+type\\s+)([A-Z][a-zA-Z0-9'_]*)"
601
602
  - name: meta.module.signature.ocaml
602
- endCaptures:
603
- "1":
603
+ endCaptures:
604
+ '1':
604
605
  name: keyword.other.module.signature.ocaml
605
- "2":
606
+ '2':
606
607
  name: punctuation.terminator.expression.ocaml
607
- "3":
608
+ '3':
608
609
  name: keyword.operator.ocaml
609
- begin: \b(sig)\b
610
- beginCaptures:
611
- "1":
610
+ begin: "\\b(sig)\\b"
611
+ beginCaptures:
612
+ '1':
612
613
  name: keyword.other.module.signature.ocaml
613
- end: \b(end)\b
614
- patterns:
614
+ end: "\\b(end)\\b"
615
+ patterns:
615
616
  - include: "#module-signature"
616
- - include: $self
617
+ - include: "$self"
617
618
  - name: meta.module.structure.ocaml
618
- endCaptures:
619
- "1":
619
+ endCaptures:
620
+ '1':
620
621
  name: keyword.other.module.structure.ocaml
621
- begin: \b(struct)\b
622
- beginCaptures:
623
- "1":
622
+ begin: "\\b(struct)\\b"
623
+ beginCaptures:
624
+ '1':
624
625
  name: keyword.other.module.structure.ocaml
625
- end: \b(end)\b
626
- patterns:
627
- - include: $self
626
+ end: "\\b(end)\\b"
627
+ patterns:
628
+ - include: "$self"
628
629
  - include: "#moduleref"
629
630
  - name: meta.module.open.ocaml
630
- begin: \b(open)\s+([A-Z][a-zA-Z0-9'_]*)(?=(\.[A-Z][a-zA-Z0-9_]*)*)
631
- beginCaptures:
632
- "1":
631
+ begin: "\\b(open)\\s+([A-Z][a-zA-Z0-9'_]*)(?=(\\.[A-Z][a-zA-Z0-9_]*)*)"
632
+ beginCaptures:
633
+ '1':
633
634
  name: keyword.other.ocaml
634
- "2":
635
+ '2':
635
636
  name: support.other.module.ocaml
636
- end: (\s|$)
637
- patterns:
637
+ end: "(\\s|$)"
638
+ patterns:
638
639
  - name: support.other.module.ocaml
639
- captures:
640
- "1":
640
+ captures:
641
+ '1':
641
642
  name: punctuation.separator.module-reference.ocaml
642
- match: (\.)([A-Z][a-zA-Z0-9'_]*)
643
+ match: "(\\.)([A-Z][a-zA-Z0-9'_]*)"
643
644
  - name: meta.exception.ocaml
644
- captures:
645
- "1":
645
+ captures:
646
+ '1':
646
647
  name: keyword.other.ocaml
647
- "2":
648
+ '2':
648
649
  name: entity.name.type.exception.ocaml
649
- match: \b(exception)\s+([A-Z][a-zA-Z0-9'_]*)\b
650
+ match: "\\b(exception)\\s+([A-Z][a-zA-Z0-9'_]*)\\b"
650
651
  - name: source.camlp4.embedded.ocaml
651
- endCaptures:
652
- "1":
652
+ endCaptures:
653
+ '1':
653
654
  name: punctuation.definition.camlp4-stream.ocaml
654
- begin: (?=(\[<)(?![^\[]+?[^>]]))
655
- end: (>])
656
- patterns:
655
+ begin: "(?=(\\[<)(?![^\\[]+?[^>]]))"
656
+ end: "(>])"
657
+ patterns:
657
658
  - include: source.camlp4.ocaml
658
659
  - include: "#strings"
659
660
  - include: "#constants"
@@ -661,104 +662,105 @@ patterns:
661
662
  - include: "#lists"
662
663
  - include: "#arrays"
663
664
  - name: meta.type-constraint.ocaml
664
- endCaptures:
665
- "1":
665
+ endCaptures:
666
+ '1':
666
667
  name: punctuation.separator.type-constraint.ocaml
667
- "2":
668
+ '2':
668
669
  name: storage.type.ocaml
669
- "3":
670
+ '3':
670
671
  name: punctuation.section.type-constraint.ocaml
671
- begin: (\()(?=(~[a-z][a-zA-Z0-9_]*:|("(\\"|[^"])*")|[^\(\)~"])+(?<!:)(:>|:(?![:=])))
672
- beginCaptures:
673
- "1":
672
+ begin: "(\\()(?=(~[a-z][a-zA-Z0-9_]*:|(\"(\\\\\"|[^\"])*\")|[^\\(\\)~\"])+(?<!:)(:>|:(?![:=])))"
673
+ beginCaptures:
674
+ '1':
674
675
  name: punctuation.section.type-constraint.ocaml
675
- end: (?<!:)(:>|:(?![:=]))(.*?)(\))
676
- patterns:
677
- - include: $self
676
+ end: "(?<!:)(:>|:(?![:=]))(.*?)(\\))"
677
+ patterns:
678
+ - include: "$self"
678
679
  - name: keyword.other.directive.ocaml
679
- match: ^[ \t]*#[a-zA-Z]+
680
+ match: "^[ \\t]*#[a-zA-Z]+"
680
681
  - name: keyword.other.directive.line-number.ocaml
681
- match: ^[ \t]*#[0-9]*
682
+ match: "^[ \\t]*#[0-9]*"
682
683
  - include: "#storagetypes"
683
684
  - name: keyword.other.storage.modifier.ocaml
684
- match: \b(mutable|ref)\b
685
+ match: "\\b(mutable|ref)\\b"
685
686
  - name: entity.name.type.variant.polymorphic.ocaml
686
- match: `[A-Za-z][a-zA-Z0-9'_]*\b
687
+ match: "`[A-Za-z][a-zA-Z0-9'_]*\\b"
687
688
  - name: entity.name.type.variant.ocaml
688
- match: \b[A-Z][a-zA-Z0-9'_]*\b
689
+ match: "\\b[A-Z][a-zA-Z0-9'_]*\\b"
689
690
  - name: keyword.operator.symbol.ocaml
690
691
  match: "!=|:=|>|<"
691
692
  - name: keyword.operator.infix.floating-point.ocaml
692
693
  match: "[*+/-]\\."
693
694
  - name: keyword.operator.prefix.floating-point.ocaml
694
- match: ~-\.
695
+ match: "~-\\."
695
696
  - name: punctuation.definition.list.constructor.ocaml
696
697
  match: "::"
697
698
  - name: punctuation.terminator.expression.ocaml
698
- match: ;;
699
+ match: ";;"
699
700
  - name: punctuation.separator.ocaml
700
- match: ;
701
+ match: ";"
701
702
  - name: punctuation.separator.function-return.ocaml
702
- match: ->
703
+ match: "->"
703
704
  - name: keyword.operator.infix.ocaml
704
705
  match: "[=<>@^&+\\-*/$%|][|!$%&*+./:<=>?@^~-]*"
705
706
  - name: keyword.operator.prefix.ocaml
706
- match: \bnot\b|!|[!\?~][!$%&*+./:<=>?@^~-]+
707
+ match: "\\bnot\\b|!|[!\\?~][!$%&*+./:<=>?@^~-]+"
707
708
  - name: entity.name.tag.label.ocaml
708
- captures:
709
- "1":
709
+ captures:
710
+ '1':
710
711
  name: punctuation.separator.argument-label.ocaml
711
- match: ~[a-z][a-z0-9'_]*(:)?
712
+ match: "~[a-z][a-z0-9'_]*(:)?"
712
713
  - name: meta.begin-end-group.ocaml
713
- endCaptures:
714
- "1":
714
+ endCaptures:
715
+ '1':
715
716
  name: keyword.control.begin-end.ocaml
716
- begin: \b(begin)\b
717
- beginCaptures:
718
- "1":
717
+ begin: "\\b(begin)\\b"
718
+ beginCaptures:
719
+ '1':
719
720
  name: keyword.control.begin-end.ocaml
720
- end: \b(end)\b
721
- patterns:
722
- - include: $self
721
+ end: "\\b(end)\\b"
722
+ patterns:
723
+ - include: "$self"
723
724
  - name: meta.for-loop.ocaml
724
- endCaptures:
725
- "1":
725
+ endCaptures:
726
+ '1':
726
727
  name: keyword.control.for-loop.ocaml
727
- begin: \b(for)\b
728
- beginCaptures:
729
- "1":
728
+ begin: "\\b(for)\\b"
729
+ beginCaptures:
730
+ '1':
730
731
  name: keyword.control.for-loop.ocaml
731
- end: \b(done)\b
732
- patterns:
732
+ end: "\\b(done)\\b"
733
+ patterns:
733
734
  - name: keyword.control.loop.ocaml
734
- match: \bdo\b
735
- - include: $self
735
+ match: "\\bdo\\b"
736
+ - include: "$self"
736
737
  - name: meta.while-loop.ocaml
737
- endCaptures:
738
- "1":
738
+ endCaptures:
739
+ '1':
739
740
  name: keyword.control.while-loop.ocaml
740
- begin: \b(while)\b
741
- beginCaptures:
742
- "1":
741
+ begin: "\\b(while)\\b"
742
+ beginCaptures:
743
+ '1':
743
744
  name: keyword.control.while-loop.ocaml
744
- end: \b(done)\b
745
- patterns:
745
+ end: "\\b(done)\\b"
746
+ patterns:
746
747
  - name: keyword.control.loop.ocaml
747
- match: \bdo\b
748
- - include: $self
748
+ match: "\\bdo\\b"
749
+ - include: "$self"
749
750
  - name: meta.paren-group.ocaml
750
- begin: \(
751
- end: \)
752
- patterns:
753
- - include: $self
751
+ begin: "\\("
752
+ end: "\\)"
753
+ patterns:
754
+ - include: "$self"
754
755
  - name: keyword.operator.ocaml
755
- match: \b(and|land|lor|lsl|lsr|lxor|mod|or)\b
756
+ match: "\\b(and|land|lor|lsl|lsr|lxor|mod|or)\\b"
756
757
  - name: keyword.control.ocaml
757
- match: \b(downto|if|else|match|then|to|when|with|try)\b
758
+ match: "\\b(downto|if|else|match|then|to|when|with|try)\\b"
758
759
  - name: keyword.other.ocaml
759
- match: \b(as|assert|class|constraint|exception|functor|in|include|inherit|initializer|lazy|let|mod|module|mutable|new|object|open|private|rec|sig|struct|type|val|virtual)\b
760
+ match: "\\b(as|assert|class|constraint|exception|functor|in|include|inherit|initializer|lazy|let|mod|module|mutable|new|object|open|private|rec|sig|struct|type|val|virtual)\\b"
760
761
  - include: "#module-signature"
761
762
  - name: invalid.illegal.unrecognized-character.ocaml
762
- match: "(\xE2\x80\x99|\xE2\x80\x98|\xE2\x80\x9C|\xE2\x80\x9D)"
763
- foldingStopMarker: (\bend(\s+in)?[ \t]*(;{1,2}|=)?|\bdone;?|^\s*;;|^\s*in)[ \t]*$
764
- keyEquivalent: ^~O
763
+ match: "(’|‘|“|”)"
764
+ foldingStopMarker: "(\\bend(\\s+in)?[ \\t]*(;{1,2}|=)?|\\bdone;?|^\\s*;;|^\\s*in)[
765
+ \\t]*$"
766
+ keyEquivalent: "^~O"