textpow 0.10.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. data/.travis.yml +7 -0
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +30 -0
  4. data/{History.txt → History.rdoc} +10 -0
  5. data/{README.txt → MIT-LICENSE.txt} +0 -30
  6. data/README.rdoc +82 -0
  7. data/Rakefile +42 -49
  8. data/bin/plist2syntax +0 -0
  9. data/bin/plist2yaml +0 -0
  10. data/examples/benchmark_js.rb +13 -0
  11. data/examples/jquery.js +9046 -0
  12. data/lib/textpow.rb +43 -3
  13. data/lib/textpow/debug_processor.rb +35 -35
  14. data/lib/textpow/recording_processor.rb +13 -0
  15. data/lib/textpow/score_manager.rb +60 -60
  16. data/lib/textpow/syntax.rb +303 -262
  17. data/lib/textpow/syntax/broken/markdown.syntax +519 -0
  18. data/lib/textpow/syntax/broken/php.syntax +1253 -0
  19. data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
  20. data/lib/textpow/syntax/old/YAML.yaml +160 -0
  21. data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
  22. data/lib/textpow/syntax/source.actionscript.syntax +97 -0
  23. data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
  24. data/lib/textpow/syntax/source.active4d.syntax +276 -0
  25. data/lib/textpow/syntax/source.ada.syntax +33 -0
  26. data/lib/textpow/syntax/source.antlr.syntax +151 -0
  27. data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
  28. data/lib/textpow/syntax/source.apache-config.syntax +191 -0
  29. data/lib/textpow/syntax/source.applescript.syntax +384 -0
  30. data/lib/textpow/syntax/source.asp.syntax +70 -0
  31. data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
  32. data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
  33. data/lib/textpow/syntax/source.c++.syntax +186 -0
  34. data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
  35. data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
  36. data/lib/textpow/syntax/source.c.syntax +414 -0
  37. data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
  38. data/lib/textpow/syntax/source.cm.syntax +32 -0
  39. data/lib/textpow/syntax/source.coffee.syntax +216 -0
  40. data/lib/textpow/syntax/source.context-free.syntax +176 -0
  41. data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
  42. data/lib/textpow/syntax/source.css.syntax +195 -0
  43. data/lib/textpow/syntax/source.d.syntax +142 -0
  44. data/lib/textpow/syntax/source.diff.syntax +81 -0
  45. data/lib/textpow/syntax/source.dot.syntax +47 -0
  46. data/lib/textpow/syntax/source.dylan.syntax +62 -0
  47. data/lib/textpow/syntax/source.eiffel.syntax +78 -0
  48. data/lib/textpow/syntax/source.erlang.syntax +922 -0
  49. data/lib/textpow/syntax/source.fortran.syntax +141 -0
  50. data/lib/textpow/syntax/source.fscript.syntax +80 -0
  51. data/lib/textpow/syntax/source.fxscript.syntax +142 -0
  52. data/lib/textpow/syntax/source.gri.syntax +83 -0
  53. data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
  54. data/lib/textpow/syntax/source.haskell.syntax +88 -0
  55. data/lib/textpow/syntax/source.icalendar.syntax +32 -0
  56. data/lib/textpow/syntax/source.inform.syntax +48 -0
  57. data/lib/textpow/syntax/source.ini.syntax +55 -0
  58. data/lib/textpow/syntax/source.io.syntax +81 -0
  59. data/lib/textpow/syntax/source.java-props.syntax +20 -0
  60. data/lib/textpow/syntax/source.java.syntax +211 -0
  61. data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
  62. data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
  63. data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
  64. data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
  65. data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
  66. data/lib/textpow/syntax/source.js.syntax +256 -0
  67. data/lib/textpow/syntax/source.js.yui.syntax +176 -0
  68. data/lib/textpow/syntax/source.json.syntax +136 -0
  69. data/lib/textpow/syntax/source.lex.syntax +219 -0
  70. data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
  71. data/lib/textpow/syntax/source.lilypond.syntax +492 -0
  72. data/lib/textpow/syntax/source.lisp.syntax +61 -0
  73. data/lib/textpow/syntax/source.logo.syntax +29 -0
  74. data/lib/textpow/syntax/source.logtalk.syntax +152 -0
  75. data/lib/textpow/syntax/source.lua.syntax +86 -0
  76. data/lib/textpow/syntax/source.makefile.syntax +36 -0
  77. data/lib/textpow/syntax/source.matlab.syntax +142 -0
  78. data/lib/textpow/syntax/source.mel.syntax +92 -0
  79. data/lib/textpow/syntax/source.mips.syntax +66 -0
  80. data/lib/textpow/syntax/source.ml.syntax +121 -0
  81. data/lib/textpow/syntax/source.modula-3.syntax +47 -0
  82. data/lib/textpow/syntax/source.nant-build.syntax +53 -0
  83. data/lib/textpow/syntax/source.objc++.syntax +18 -0
  84. data/lib/textpow/syntax/source.objc.syntax +233 -0
  85. data/lib/textpow/syntax/source.ocaml.syntax +764 -0
  86. data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
  87. data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
  88. data/lib/textpow/syntax/source.open-gl.syntax +14 -0
  89. data/lib/textpow/syntax/source.pascal.syntax +77 -0
  90. data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
  91. data/lib/textpow/syntax/source.perl.syntax +1113 -0
  92. data/lib/textpow/syntax/source.php.cake.syntax +55 -0
  93. data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
  94. data/lib/textpow/syntax/source.postscript.syntax +114 -0
  95. data/lib/textpow/syntax/source.processing.syntax +106 -0
  96. data/lib/textpow/syntax/source.prolog.syntax +40 -0
  97. data/lib/textpow/syntax/source.python.django.syntax +21 -0
  98. data/lib/textpow/syntax/source.python.syntax +868 -0
  99. data/lib/textpow/syntax/source.qmake.syntax +114 -0
  100. data/lib/textpow/syntax/source.quake-config.syntax +32 -0
  101. data/lib/textpow/syntax/source.r-console.syntax +16 -0
  102. data/lib/textpow/syntax/source.r.syntax +81 -0
  103. data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
  104. data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
  105. data/lib/textpow/syntax/source.regexp.syntax +50 -0
  106. data/lib/textpow/syntax/source.remind.syntax +253 -0
  107. data/lib/textpow/syntax/source.rez.syntax +80 -0
  108. data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
  109. data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
  110. data/lib/textpow/syntax/source.ruby.syntax +1035 -0
  111. data/lib/textpow/syntax/source.s5.syntax +69 -0
  112. data/lib/textpow/syntax/source.sass.syntax +45 -0
  113. data/lib/textpow/syntax/source.scheme.syntax +347 -0
  114. data/lib/textpow/syntax/source.scilab.syntax +41 -0
  115. data/lib/textpow/syntax/source.scss.syntax +527 -0
  116. data/lib/textpow/syntax/source.shell.syntax +384 -0
  117. data/lib/textpow/syntax/source.slate.syntax +149 -0
  118. data/lib/textpow/syntax/source.smarty.syntax +63 -0
  119. data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
  120. data/lib/textpow/syntax/source.sql.syntax +237 -0
  121. data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
  122. data/lib/textpow/syntax/source.strings.syntax +39 -0
  123. data/lib/textpow/syntax/source.swig.syntax +57 -0
  124. data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
  125. data/lib/textpow/syntax/source.tcl.syntax +152 -0
  126. data/lib/textpow/syntax/source.yaml.syntax +160 -0
  127. data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
  128. data/lib/textpow/syntax/text.bbcode.syntax +287 -0
  129. data/lib/textpow/syntax/text.bibtex.syntax +151 -0
  130. data/lib/textpow/syntax/text.blog.html.syntax +41 -0
  131. data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
  132. data/lib/textpow/syntax/text.blog.syntax +27 -0
  133. data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
  134. data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
  135. data/lib/textpow/syntax/text.haml.syntax +88 -0
  136. data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
  137. data/lib/textpow/syntax/text.html.asp.syntax +27 -0
  138. data/lib/textpow/syntax/text.html.basic.syntax +362 -0
  139. data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
  140. data/lib/textpow/syntax/text.html.django.syntax +36 -0
  141. data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
  142. data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
  143. data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
  144. data/lib/textpow/syntax/text.html.mason.syntax +119 -0
  145. data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
  146. data/lib/textpow/syntax/text.html.mt.syntax +162 -0
  147. data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
  148. data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
  149. data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
  150. data/lib/textpow/syntax/text.html.textile.syntax +215 -0
  151. data/lib/textpow/syntax/text.html.tt.syntax +121 -0
  152. data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
  153. data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
  154. data/lib/textpow/syntax/text.log.latex.syntax +50 -0
  155. data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
  156. data/lib/textpow/syntax/text.man.syntax +17 -0
  157. data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
  158. data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
  159. data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
  160. data/lib/textpow/syntax/text.plain.syntax +32 -0
  161. data/lib/textpow/syntax/text.plist.syntax +635 -0
  162. data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
  163. data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
  164. data/lib/textpow/syntax/text.setext.syntax +147 -0
  165. data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
  166. data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
  167. data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
  168. data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
  169. data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
  170. data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
  171. data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
  172. data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
  173. data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
  174. data/lib/textpow/syntax/text.tex.math.syntax +49 -0
  175. data/lib/textpow/syntax/text.tex.syntax +86 -0
  176. data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
  177. data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
  178. data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
  179. data/lib/textpow/syntax/text.xml.syntax +180 -0
  180. data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
  181. data/lib/textpow/version.rb +3 -0
  182. data/spec/fixtures/objeck.plist +107 -0
  183. data/spec/fixtures/utf8.txt +1 -0
  184. data/spec/spec_helper.rb +2 -0
  185. data/spec/textpow/score_manager_spec.rb +20 -0
  186. data/spec/textpow/syntax_files_spec.rb +26 -0
  187. data/spec/textpow/syntax_spec.rb +225 -0
  188. data/spec/textpow_spec.rb +57 -0
  189. data/textpow.gemspec +19 -0
  190. metadata +246 -68
  191. data/Manifest.txt +0 -13
  192. data/mm/manual.mm +0 -266
  193. data/test/test_textpow.rb +0 -25
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: Smarty
3
+ fileTypes: []
4
+
5
+ scopeName: source.smarty
6
+ uuid: 4D6BBA54-E3FC-4296-9CA1-662B2AD537C6
7
+ foldingStartMarker: (<(?i:(head|table|tr|div|style|script|ul|ol|form|dl))\b.*?>|\{\{?(if|foreach|capture|literal|foreach|php|section|strip)|\{\s*$)
8
+ patterns:
9
+ - name: comment.block.smarty
10
+ captures:
11
+ "0":
12
+ name: punctuation.definition.comment.smarty
13
+ begin: (?<=\{)\*
14
+ end: \*(?=\})
15
+ - name: keyword.control.smarty
16
+ match: \b(if|else|elseif|foreach|foreachelse|section)\b
17
+ - name: support.function.built-in.smarty
18
+ match: \b(capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|html_[a-z_]*)\b
19
+ - name: keyword.operator.smarty
20
+ match: \b(and|or)\b
21
+ - name: keyword.operator.other.smarty
22
+ match: \b(eq|neq|gt|lt|gte|lte|is|not|even|odd|not|mod|div|by)\b
23
+ - name: support.function.variable-modifier.smarty
24
+ match: \|(capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)
25
+ - name: meta.attribute.smarty
26
+ match: \b[a-zA-Z]+=
27
+ - name: string.quoted.single.smarty
28
+ endCaptures:
29
+ "0":
30
+ name: punctuation.definition.string.end.smarty
31
+ begin: "'"
32
+ beginCaptures:
33
+ "0":
34
+ name: punctuation.definition.string.begin.smarty
35
+ end: "'"
36
+ patterns:
37
+ - name: constant.character.escape.smarty
38
+ match: \\.
39
+ - name: string.quoted.double.smarty
40
+ endCaptures:
41
+ "0":
42
+ name: punctuation.definition.string.end.smarty
43
+ begin: "\""
44
+ beginCaptures:
45
+ "0":
46
+ name: punctuation.definition.string.begin.smarty
47
+ end: "\""
48
+ patterns:
49
+ - name: constant.character.escape.smarty
50
+ match: \\.
51
+ - name: variable.other.global.smarty
52
+ captures:
53
+ "1":
54
+ name: punctuation.definition.variable.smarty
55
+ match: \b(\$)Smarty\.
56
+ - name: variable.other.smarty
57
+ captures:
58
+ "1":
59
+ name: punctuation.definition.variable.smarty
60
+ match: (\$)[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*?\b
61
+ - name: constant.language.smarty
62
+ match: \b(TRUE|FALSE|true|false)\b
63
+ foldingStopMarker: (</(?i:(head|table|tr|div|style|script|ul|ol|form|dl))>|\{\{?/(if|foreach|capture|literal|foreach|php|section|strip)|(^|\s)\})
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: SQL (Rails)
3
+ fileTypes:
4
+ - erbsql
5
+ scopeName: source.sql.ruby
6
+ uuid: D54FBDED-5481-4CC7-B75F-66465A499882
7
+ foldingStartMarker: \s*\(\s*$
8
+ patterns:
9
+ - name: source.ruby.rails.embedded.sql
10
+ begin: <%+(?!>)=?
11
+ end: "%>"
12
+ patterns:
13
+ - name: comment.line.number-sign.ruby
14
+ match: "#.*?(?=%>)"
15
+ - include: source.ruby.rails
16
+ - include: source.sql
17
+ foldingStopMarker: ^\s*\)
18
+ keyEquivalent: ^~R
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: SQL
3
+ fileTypes:
4
+ - sql
5
+ - ddl
6
+ - dml
7
+ scopeName: source.sql
8
+ repository:
9
+ string_interpolation:
10
+ name: string.interpolated.sql
11
+ captures:
12
+ "1":
13
+ name: punctuation.definition.string.end.sql
14
+ match: (#\{)([^\}]*)(\})
15
+ comments:
16
+ patterns:
17
+ - name: comment.line.double-dash.sql
18
+ captures:
19
+ "1":
20
+ name: punctuation.definition.comment.sql
21
+ match: (--).*$\n?
22
+ - name: comment.line.number-sign.sql
23
+ captures:
24
+ "1":
25
+ name: punctuation.definition.comment.sql
26
+ match: (#).*$\n?
27
+ - name: comment.block.c
28
+ captures:
29
+ "0":
30
+ name: punctuation.definition.comment.sql
31
+ begin: /\*
32
+ end: \*/
33
+ string_escape:
34
+ name: constant.character.escape.sql
35
+ match: \\.
36
+ strings:
37
+ patterns:
38
+ - name: string.quoted.single.sql
39
+ captures:
40
+ "1":
41
+ name: punctuation.definition.string.begin.sql
42
+ "3":
43
+ name: punctuation.definition.string.end.sql
44
+ match: (')[^'\\]*(')
45
+ comment: this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.
46
+ - name: string.quoted.single.sql
47
+ endCaptures:
48
+ "0":
49
+ name: punctuation.definition.string.end.sql
50
+ begin: "'"
51
+ beginCaptures:
52
+ "0":
53
+ name: punctuation.definition.string.begin.sql
54
+ end: "'"
55
+ patterns:
56
+ - include: "#string_escape"
57
+ - name: string.quoted.other.backtick.sql
58
+ captures:
59
+ "1":
60
+ name: punctuation.definition.string.begin.sql
61
+ "3":
62
+ name: punctuation.definition.string.end.sql
63
+ match: (`)[^`\\]*(`)
64
+ comment: this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.
65
+ - name: string.quoted.other.backtick.sql
66
+ endCaptures:
67
+ "0":
68
+ name: punctuation.definition.string.end.sql
69
+ begin: "`"
70
+ beginCaptures:
71
+ "0":
72
+ name: punctuation.definition.string.begin.sql
73
+ end: "`"
74
+ patterns:
75
+ - include: "#string_escape"
76
+ - name: string.quoted.double.sql
77
+ captures:
78
+ "1":
79
+ name: punctuation.definition.string.begin.sql
80
+ "3":
81
+ name: punctuation.definition.string.end.sql
82
+ match: (")[^"#]*(")
83
+ comment: this is faster than the next begin/end rule since sub-pattern will match till end-of-line and SQL files tend to have very long lines.
84
+ - name: string.quoted.double.sql
85
+ endCaptures:
86
+ "0":
87
+ name: punctuation.definition.string.end.sql
88
+ begin: "\""
89
+ beginCaptures:
90
+ "0":
91
+ name: punctuation.definition.string.begin.sql
92
+ end: "\""
93
+ patterns:
94
+ - include: "#string_interpolation"
95
+ - name: string.other.quoted.brackets.sql
96
+ endCaptures:
97
+ "0":
98
+ name: punctuation.definition.string.end.sql
99
+ begin: "%\\{"
100
+ beginCaptures:
101
+ "0":
102
+ name: punctuation.definition.string.begin.sql
103
+ end: \}
104
+ patterns:
105
+ - include: "#string_interpolation"
106
+ regexps:
107
+ patterns:
108
+ - name: string.regexp.sql
109
+ endCaptures:
110
+ "0":
111
+ name: punctuation.definition.string.end.sql
112
+ begin: /(?=\S.*/)
113
+ beginCaptures:
114
+ "0":
115
+ name: punctuation.definition.string.begin.sql
116
+ end: /
117
+ patterns:
118
+ - include: "#string_interpolation"
119
+ - name: constant.character.escape.slash.sql
120
+ match: \\/
121
+ - name: string.regexp.modr.sql
122
+ endCaptures:
123
+ "0":
124
+ name: punctuation.definition.string.end.sql
125
+ begin: "%r\\{"
126
+ beginCaptures:
127
+ "0":
128
+ name: punctuation.definition.string.begin.sql
129
+ end: \}
130
+ patterns:
131
+ - include: "#string_interpolation"
132
+ comment: We should probably handle nested bracket pairs!?! -- Allan
133
+ uuid: C49120AC-6ECC-11D9-ACC8-000D93589AF6
134
+ foldingStartMarker: \s*\(\s*$
135
+ patterns:
136
+ - name: meta.create.sql
137
+ captures:
138
+ "1":
139
+ name: keyword.other.create.sql
140
+ "2":
141
+ name: keyword.other.sql
142
+ "5":
143
+ name: entity.name.function.sql
144
+ match: (?i:^\s*(create)\s+(aggregate|conversion|database|domain|function|group|(unique\s+)?index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)(['"`]?)(\w+)\4
145
+ - name: meta.drop.sql
146
+ captures:
147
+ "1":
148
+ name: keyword.other.create.sql
149
+ "2":
150
+ name: keyword.other.sql
151
+ match: (?i:^\s*(drop)\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view))
152
+ - name: meta.drop.sql
153
+ captures:
154
+ "1":
155
+ name: keyword.other.create.sql
156
+ "2":
157
+ name: keyword.other.table.sql
158
+ "3":
159
+ name: entity.name.function.sql
160
+ "4":
161
+ name: keyword.other.cascade.sql
162
+ match: (?i:\s*(drop)\s+(table)\s+(\w+)(\s+cascade)?\b)
163
+ - name: meta.alter.sql
164
+ captures:
165
+ "1":
166
+ name: keyword.other.create.sql
167
+ "2":
168
+ name: keyword.other.table.sql
169
+ match: (?i:^\s*(alter)\s+(aggregate|conversion|database|domain|function|group|index|language|operator class|operator|rule|schema|sequence|table|tablespace|trigger|type|user|view)\s+)
170
+ - captures:
171
+ "6":
172
+ name: storage.type.sql
173
+ "11":
174
+ name: storage.type.sql
175
+ "7":
176
+ name: constant.numeric.sql
177
+ "12":
178
+ name: storage.type.sql
179
+ "8":
180
+ name: constant.numeric.sql
181
+ "13":
182
+ name: storage.type.sql
183
+ "9":
184
+ name: storage.type.sql
185
+ "14":
186
+ name: constant.numeric.sql
187
+ "15":
188
+ name: storage.type.sql
189
+ "1":
190
+ name: storage.type.sql
191
+ "2":
192
+ name: storage.type.sql
193
+ "3":
194
+ name: constant.numeric.sql
195
+ "4":
196
+ name: storage.type.sql
197
+ "10":
198
+ name: constant.numeric.sql
199
+ "5":
200
+ name: constant.numeric.sql
201
+ match: "(?xi)\n\n\
202
+ \t\t\t\t# normal stuff, capture 1\n\
203
+ \t\t\t\t \\b(bigint|bigserial|bit|boolean|box|bytea|cidr|circle|date|double\\sprecision|inet|int|integer|line|lseg|macaddr|money|oid|path|point|polygon|real|serial|smallint|sysdate|text)\\b\n\n\
204
+ \t\t\t\t# numeric suffix, capture 2 + 3i\n\
205
+ \t\t\t\t|\\b(bit\\svarying|character\\s(?:varying)?|tinyint|var\\schar|float|interval)\\((\\d+)\\)\n\n\
206
+ \t\t\t\t# optional numeric suffix, capture 4 + 5i\n\
207
+ \t\t\t\t|\\b(char|number|varchar\\d?)\\b(?:\\((\\d+)\\))?\n\n\
208
+ \t\t\t\t# special case, capture 6 + 7i + 8i\n\
209
+ \t\t\t\t|\\b(numeric)\\b(?:\\((\\d+),(\\d+)\\))?\n\n\
210
+ \t\t\t\t# special case, captures 9, 10i, 11\n\
211
+ \t\t\t\t|\\b(times)(?:\\((\\d+)\\))(\\swithoutstimeszone\\b)?\n\n\
212
+ \t\t\t\t# special case, captures 12, 13, 14i, 15\n\
213
+ \t\t\t\t|\\b(timestamp)(?:(s)\\((\\d+)\\)(\\swithoutstimeszone\\b)?)?\n\n\
214
+ \t\t\t"
215
+ - name: storage.modifier.sql
216
+ match: (?i:\b((?:primary|foreign)\s+key|references|on\sdelete(\s+cascade)?|check|constraint)\b)
217
+ - name: constant.numeric.sql
218
+ match: \d+
219
+ - name: keyword.other.DML.sql
220
+ match: (?i:\b(select(\s+distinct)?|insert\s+(ignore\s+)?into|update|delete|from|set|where|group\sby|and|union(\s+all)?|having|order\sby|limit|(inner|cross)\s+join|straight_join|(left|right)(\s+outer)?\s+join|natural(\s+(left|right)(\s+outer)?)?\s+join)\b)
221
+ - name: keyword.other.DDL.create.II.sql
222
+ match: (?i:\b(on\s+|(not\s+)?null)\b)
223
+ - name: keyword.other.DML.II.sql
224
+ match: (?i:\bvalues\b)
225
+ - name: keyword.other.LUW.sql
226
+ match: (?i:\b(begin(\s+work)?|start\s+transaction|commit(\s+work)?|rollback(\s+work)?)\b)
227
+ - name: keyword.other.authorization.sql
228
+ match: (?i:\b(grant(\swith\sgrant\soption)?|revoke)\b)
229
+ - name: keyword.other.data-integrity.sql
230
+ match: (?i:\bin\b)
231
+ - name: keyword.other.object-comments.sql
232
+ match: (?i:^\s*(comment\s+on\s+(table|column|aggregate|constraint|database|domain|function|index|operator|rule|schema|sequence|trigger|type|view))\s+.*?\s+(is)\s+)
233
+ - include: "#comments"
234
+ - include: "#strings"
235
+ - include: "#regexps"
236
+ foldingStopMarker: ^\s*\)
237
+ keyEquivalent: ^~S
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: SSH Config
3
+ fileTypes:
4
+ - ssh_config
5
+ - config
6
+ - sshd_config
7
+ scopeName: source.ssh-config
8
+ uuid: B273855C-59D3-4DF3-9B7C-E68E0057D315
9
+ patterns:
10
+ - name: keyword.other.ssh-config
11
+ match: \b(AddressFamily|B(atchMode|indAddress)|C(hallengeResponseAuthentication|heckHostIP|iphers?|learAllForwardings|ompression(Level)?|onnect(Timeout|ionAttempts))|DynamicForward|E(nableSSHKeysign|scapeChar)|Forward(Agent|X11(Trusted)?)|G(SSAPI(Authentication|DelegateCredentials)|atewayPorts|lobalKnownHostsFile)|Host(KeyAlgorithms|KeyAlias|Name|basedAuthentication)|Identit(iesOnly|yFile)|L(ocalForward|ogLevel)|MACs|N(oHostAuthenticationForLocalhost|umberOfPasswordPrompts)|P(asswordAuthentication|ort|referredAuthentications|rotocol|roxyCommand|ubkeyAuthentication)|R(SAAuthentication|emoteForward|hostsRSAAuthentication)|S(erverAliveCountMax|erverAliveInterval|martcardDevice|trictHostKeyChecking)|TCPKeepAlive|U(sePrivilegedPort|ser(KnownHostsFile)?)|VerifyHostKeyDNS|XAuthLocation)\b
12
+ - captures:
13
+ "1":
14
+ name: comment.line.number-sign.ssh-config
15
+ "2":
16
+ name: punctuation.definition.comment.ssh-config
17
+ "3":
18
+ name: comment.line.double-slash.ssh-config
19
+ "4":
20
+ name: punctuation.definition.comment.ssh-config
21
+ match: ((#).*$\n?)|((//).*$\n?)
22
+ - captures:
23
+ "1":
24
+ name: storage.type.ssh-config
25
+ "2":
26
+ name: entity.name.section.ssh-config
27
+ "3":
28
+ name: meta.toc-list.ssh-config
29
+ match: (?:^| |\t)(Host)\s+((.*))$
30
+ - name: constant.numeric.ssh-config
31
+ match: \b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b
32
+ - name: constant.numeric.ssh-config
33
+ match: \b[0-9]+\b
@@ -0,0 +1,39 @@
1
+ ---
2
+ name: Strings File
3
+ fileTypes:
4
+ - strings
5
+ scopeName: source.strings
6
+ uuid: 429E2DB7-EB4F-4B34-A4DF-DBFD3336C581
7
+ patterns:
8
+ - name: comment.block.strings
9
+ captures:
10
+ "0":
11
+ name: punctuation.definition.comment.strings
12
+ begin: /\*
13
+ end: \*/
14
+ - name: string.quoted.double.strings
15
+ endCaptures:
16
+ "0":
17
+ name: punctuation.definition.string.end.strings
18
+ begin: "\""
19
+ beginCaptures:
20
+ "0":
21
+ name: punctuation.definition.string.begin.strings
22
+ end: "\""
23
+ patterns:
24
+ - name: constant.character.escape.strings
25
+ match: \\(\\|[abefnrtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-zA-Z0-9]+)
26
+ - name: invalid.illegal.unknown-escape.strings
27
+ match: \\.
28
+ - name: constant.other.placeholder.strings
29
+ match: "(?x)%\n\
30
+ \t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n\
31
+ \t\t\t\t\t\t[#0\\- +']* # flags\n\
32
+ \t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n\
33
+ \t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n\
34
+ \t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n\
35
+ \t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n\
36
+ \t\t\t\t\t\t[@diouxXDOUeEfFgGaACcSspn%] # conversion type\n\
37
+ \t\t\t\t\t"
38
+ - name: invalid.illegal.placeholder.c
39
+ match: "%"
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: SWIG
3
+ fileTypes:
4
+ - i
5
+ - swg
6
+ scopeName: source.swig
7
+ uuid: C781B0D0-BED9-11D9-A141-000393A143CC
8
+ foldingStartMarker: (/\*\*|%?\{\s*$)
9
+ patterns:
10
+ - include: source.c++
11
+ comment: SWIG files contain C or C++ code, so it's logical to derive from the C++ rules
12
+ - name: keyword.other.directive.inlinecode.swig
13
+ captures:
14
+ "1":
15
+ name: punctuation.definition.keyword.swig
16
+ match: (%)(header|init|inline|native|runtime|wrapper)\b
17
+ - name: keyword.other.function-parameter.swig
18
+ captures:
19
+ "1":
20
+ name: punctuation.definition.keyword.swig
21
+ match: (\$)([\*&]*[1-9]+(_name|_type|_ltype|_basetype|_mangle|_descriptor){0,1}|action|input|result|symname)\b
22
+ - name: support.function.type.swig
23
+ match: \b(in|out|typecheck|arginit|default|check|argout|freearg|newfree|memberin|varin|varout|throws|numinputs)\b
24
+ - name: keyword.other.directive.swig
25
+ captures:
26
+ "1":
27
+ name: punctuation.definition.keyword.swig
28
+ match: (%)(apply|callback|clear|constant|contract|define|enddef|extend|feature|ignore|insert|makedefault|module|nocallback|nodefault|rename|typemap|varargs|template)\b
29
+ - name: meta.preprocessor.swig
30
+ captures:
31
+ "1":
32
+ name: keyword.control.import.swig
33
+ match: \(\s*(allegrocl|chicken|csharp|guile|java|modula3|mzscheme|ocaml|perl|php|pike|python|ruby|sexp|tcl|xml)\b
34
+ - name: meta.preprocessor.swig
35
+ captures:
36
+ "1":
37
+ name: punctuation.definition.preprocessor.swig
38
+ "2":
39
+ name: keyword.control.import.swig
40
+ "3":
41
+ name: string.quoted.double.swig
42
+ begin: ^\s*(%)\s*(include|import)\b\s+("?[A-Za-z0-9\._]+"?)
43
+ end: $
44
+ - name: meta.preprocessor.macro.swig
45
+ captures:
46
+ "1":
47
+ name: punctuation.definition.preprocessor.swig
48
+ match: (%)([A-Za-z]+[A-Za-z0-9_]*)\b
49
+ - name: storage.type.swig
50
+ match: \bSWIG_TYPECHECK_(POINTER|VOIDPTR|BOOL|UINT8|INT8|UINT16|INT16|UINT32|INT32|UINT64|INT64|UINT128|INT128|INTEGER|FLOAT|DOUBLE|COMPLEX|UNICHAR|UNISTRING|CHAR|STRING|BOOL_ARRAY|INT8_ARRAY|INT16_ARRAY|INT32_ARRAY|INT64_ARRAY|INT128_ARRAY|FLOAT_ARRAY|DOUBLE_ARRAY|CHAR_ARRAY|STRING_ARRAY)\b
51
+ - name: source.swig.codeblock
52
+ captures:
53
+ "1":
54
+ name: punctuation.section.embedded.swig
55
+ match: (%\{|%\})
56
+ foldingStopMarker: (\*\*/|^\s*%?\})
57
+ keyEquivalent: ^~S