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,163 @@
1
+ ---
2
+ name: MacPorts Portfile
3
+ fileTypes: []
4
+
5
+ scopeName: source.tcl.macports
6
+ repository:
7
+ escape:
8
+ name: constant.character.escape.tcl
9
+ match: \\(\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\n)
10
+ comment: imported from Tcl grammar
11
+ bare-string:
12
+ endCaptures:
13
+ "1":
14
+ name: invalid.illegal.tcl
15
+ begin: (?:^|(?<=\s))"
16
+ end: "\"(\\S*)"
17
+ patterns:
18
+ - include: "#escape"
19
+ - include: "#variable"
20
+ comment: imported from Tcl grammar
21
+ braces:
22
+ endCaptures:
23
+ "1":
24
+ name: invalid.illegal.tcl
25
+ begin: (?:^|(?<=\s))\{
26
+ end: \}(\S*)
27
+ patterns:
28
+ - name: constant.character.escape.tcl
29
+ match: \\[{}\n]
30
+ - include: "#inner-braces"
31
+ comment: imported from Tcl grammar
32
+ inner-braces:
33
+ begin: \{
34
+ end: \}
35
+ patterns:
36
+ - name: constant.character.escape.tcl
37
+ match: \\[{}\n]
38
+ - include: "#inner-braces"
39
+ comment: imported from Tcl grammar
40
+ variable:
41
+ name: variable.other.tcl
42
+ captures:
43
+ "1":
44
+ name: punctuation.definition.variable.tcl
45
+ match: (\$)([a-zA-Z0-9_:]+(\([^\)]+\))?|\{[^\}]*\})
46
+ comment: imported from Tcl grammar
47
+ string:
48
+ name: string.quoted.double.tcl
49
+ begin: (?:^|(?<=\s))(?=")
50
+ applyEndPatternLast: 1
51
+ end: ""
52
+ patterns:
53
+ - include: "#bare-string"
54
+ comment: imported from Tcl grammar
55
+ embedded:
56
+ name: source.tcl.embedded
57
+ endCaptures:
58
+ "0":
59
+ name: punctuation.section.embedded.end.tcl
60
+ begin: \[
61
+ beginCaptures:
62
+ "0":
63
+ name: punctuation.section.embedded.begin.tcl
64
+ end: \]
65
+ patterns:
66
+ - include: source.tcl.macports
67
+ comment: imported from Tcl grammar
68
+ uuid: 33EC56FE-2BD4-4B73-A6CD-73395F4E5E58
69
+ foldingStartMarker: \{\s*$
70
+ patterns:
71
+ - begin: ^\s*(PortGroup)\s+ruby(?!\S)
72
+ beginCaptures:
73
+ "1":
74
+ name: keyword.other.tcl.macports
75
+ end: $.^
76
+ patterns:
77
+ - include: $base
78
+ - name: keyword.other.tcl.macports
79
+ match: ^\s*ruby\.setup(?!\S)
80
+ comment: special case for ruby PortGroup
81
+ - begin: ^\s*(PortGroup)\s+perl5(?!\S)
82
+ beginCaptures:
83
+ "1":
84
+ name: keyword.other.tcl.macports
85
+ end: $.^
86
+ patterns:
87
+ - include: $base
88
+ - name: keyword.other.tcl.macports
89
+ match: ^\s*perl5\.setup(?!\S)
90
+ comment: special case for the perl5 PortGroup
91
+ - captures:
92
+ "1":
93
+ name: keyword.other.tcl.macports
94
+ match: ^\s*(PortSystem|PortGroup)(?!\S)
95
+ comment: Base commands
96
+ - captures:
97
+ "1":
98
+ name: keyword.other.tcl.macports
99
+ match: ^\s*(use_(?:configure|build|automake|autoconf|xmkmf|libtool|destroot|extract|cvs|svn|patch|test)|(?:configure|build|automake|autoconf|xmkmf|libtool|destroot|extract|cvs|svn|patch|test)\.(?:dir|(?:pre_|post_)?args|env|type|cmd)(?:-(?:delete|append))?)(?!\S)
100
+ comment: Procs defined with the `commands` keyword (ignore use_option-{delete,append} as it is useless)
101
+ - captures:
102
+ "1":
103
+ name: keyword.other.tcl.macports
104
+ match: ^\s*((?:(?:pre|post)-)?(?:activate|build|checksum|clean|configure|destroot|distcheck|extract|fetch|install|livecheck|main|mirror|patch|pkg|mpkg|submit|test))(?!\S)
105
+ comment: Procs defined with the `target_provides` keyword
106
+ - captures:
107
+ "1":
108
+ name: keyword.other.tcl.macports
109
+ match: ^\s*((?:build\.target|categories|checksum\.skip|checksums|cvs\.(?:date|module|password|root|tag)|default_variants|depends_(?:build|lib|run)|destroot\.(?:clean|destdir|keepdirs|target|umask)|dist_subdir|distcheck\.check|distfiles|distname|distpath|epoch|extract\.(?:only|suffix)|fetch\.(?:password|type|use_epsv|user)|filesdir|gnustep\.domain|homepage|install\.(?:group|user)|libpath|livecheck\.(?:check|md5|name|distname|regex|url|version)|maintainers|(?:master|patch)_sites(?:\.mirror_subdir)?|name|os\.(?:arch|endian|platform|version)|patchfiles|platforms|portdbpath|portname|prefix|revision|sources_conf|startupitem\.(?:create|executable|init|logevents|logfile|name|pidfile|requires|restart|start|stop|type)|svn\.(?:tag|url)|test\.(?:run|target)|use_bzip2|use_zip|version|workdir|worksrcdir|xcode\.(?:build\.settings|configuration|destroot\.(?:path|settings|type)|project|target)|zope\.need_subdir)(?:-(?:delete|append))?)(?!\S)
110
+ comment: Procs defined with the `options` keyword
111
+ - begin: ^\s*((?:long_)?description)(?!\S)
112
+ contentName: string.unquoted.tcl.macports
113
+ beginCaptures:
114
+ "1":
115
+ name: keyword.other.tcl.macports
116
+ end: "[\\n;]"
117
+ patterns:
118
+ - include: "#escape"
119
+ - include: "#string"
120
+ - include: "#braces"
121
+ - include: "#embedded"
122
+ - include: "#variable"
123
+ comment: special-case description and long_description for backslash-newline escapes and string scoping
124
+ - name: meta.variant.tcl.macports
125
+ captures:
126
+ "1":
127
+ name: keyword.other.variant.tcl.macports
128
+ begin: ^(variant)(?!\S)
129
+ end: \n
130
+ patterns:
131
+ - name: keyword.other.variant.tcl.macports
132
+ match: (?<=\s)(?:provides|requires|conflicts)(?!\S)
133
+ - name: entity.name.function.variant.tcl.macports
134
+ match: (?<=\s)([\w-]+)
135
+ - endCaptures:
136
+ "1":
137
+ name: punctuation.terminator.variant.tcl.macports
138
+ begin: (\{)
139
+ beginCaptures:
140
+ "1":
141
+ name: punctuation.section.variant.tcl.macports
142
+ end: (\})
143
+ patterns:
144
+ - include: source.tcl.macports
145
+ - name: meta.variant.platform.tcl.macports
146
+ endCaptures:
147
+ "1":
148
+ name: punctuation.terminator.variant.platform.tcl.macports
149
+ begin: ^(platform)(?:\s+(\S+))?(?:\s+(\S+))?(?:\s+(\S+))?\s+(\{)
150
+ beginCaptures:
151
+ "1":
152
+ name: keyword.other.variant.platform.tcl.macports
153
+ "2":
154
+ name: entity.name.function.variant.platform.tcl.macports
155
+ "5":
156
+ name: punctuation.section.variant.platform.tcl.macports
157
+ end: (\})
158
+ patterns:
159
+ - include: source.tcl.macports
160
+ - name: keyword.other.tcl.macports
161
+ match: (?<=^|[\[{;])\s*(adduser|addgroup|dirSize|binaryInPath|archiveTypeIsSupported|variant_isset|xinstall|system|reinplace|flock|readdir|strsed|mkstemp|mktemp|existsuser|existsgroup|nextuid|nextgid|md5|find|filemap|rpm-vercomp|rmd160|sha1|compat|umask|sudo|mkfifo|unixsocketpair|mkchannelfromfd|pipe|curl|readline|rl_history|getuid|geteuid|setuid|seteuid|name_to_uid|uid_to_name|ldelete|delete|include)\b
162
+ - include: source.tcl
163
+ foldingStopMarker: ^\s*\}
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: Tcl
3
+ fileTypes:
4
+ - tcl
5
+ scopeName: source.tcl
6
+ repository:
7
+ escape:
8
+ name: constant.character.escape.tcl
9
+ match: \\(\d{1,3}|x[a-fA-F0-9]+|u[a-fA-F0-9]{1,4}|.|\n)
10
+ bare-string:
11
+ endCaptures:
12
+ "1":
13
+ name: invalid.illegal.tcl
14
+ begin: (?:^|(?<=\s))"
15
+ end: "\"([^\\s\\]]*)"
16
+ patterns:
17
+ - include: "#escape"
18
+ - include: "#variable"
19
+ comment: matches a single quote-enclosed word without scoping
20
+ regexp:
21
+ begin: (?=\S)(?![\n;\]])
22
+ end: (?=[\n;\]])
23
+ patterns:
24
+ - name: string.regexp.tcl
25
+ begin: (?=[^ \t\n;])
26
+ end: (?=[ \t\n;])
27
+ patterns:
28
+ - include: "#braces"
29
+ - include: "#bare-string"
30
+ - include: "#escape"
31
+ - include: "#variable"
32
+ - begin: "[ \\t]"
33
+ end: (?=[\n;\]])
34
+ patterns:
35
+ - include: "#variable"
36
+ - include: "#embedded"
37
+ - include: "#escape"
38
+ - include: "#braces"
39
+ - include: "#string"
40
+ comment: swallow the rest of the command
41
+ comment: matches a single word, named as a regexp, then swallows the rest of the command
42
+ braces:
43
+ endCaptures:
44
+ "1":
45
+ name: invalid.illegal.tcl
46
+ begin: (?:^|(?<=\s))\{
47
+ end: \}([^\s\]]*)
48
+ patterns:
49
+ - name: constant.character.escape.tcl
50
+ match: \\[{}\n]
51
+ - include: "#inner-braces"
52
+ comment: matches a single brace-enclosed word
53
+ inner-braces:
54
+ begin: \{
55
+ end: \}
56
+ patterns:
57
+ - name: constant.character.escape.tcl
58
+ match: \\[{}\n]
59
+ - include: "#inner-braces"
60
+ comment: matches a nested brace in a brace-enclosed word
61
+ variable:
62
+ name: variable.other.tcl
63
+ captures:
64
+ "1":
65
+ name: punctuation.definition.variable.tcl
66
+ match: (\$)([a-zA-Z0-9_:]+(\([^\)]+\))?|\{[^\}]*\})
67
+ string:
68
+ name: string.quoted.double.tcl
69
+ begin: (?:^|(?<=\s))(?=")
70
+ applyEndPatternLast: 1
71
+ end: ""
72
+ patterns:
73
+ - include: "#bare-string"
74
+ comment: matches a single quote-enclosed word with scoping
75
+ embedded:
76
+ name: source.tcl.embedded
77
+ endCaptures:
78
+ "0":
79
+ name: punctuation.section.embedded.end.tcl
80
+ begin: \[
81
+ beginCaptures:
82
+ "0":
83
+ name: punctuation.section.embedded.begin.tcl
84
+ end: \]
85
+ patterns:
86
+ - include: source.tcl
87
+ uuid: F01F22AC-7CBB-11D9-9B10-000A95E13C98
88
+ foldingStartMarker: \{\s*$
89
+ patterns:
90
+ - begin: (?<=^|;)\s*((#))
91
+ contentName: comment.line.number-sign.tcl
92
+ beginCaptures:
93
+ "1":
94
+ name: comment.line.number-sign.tcl
95
+ "2":
96
+ name: punctuation.definition.comment.tcl
97
+ end: \n
98
+ patterns:
99
+ - match: (\\\\|\\\n)
100
+ - captures:
101
+ "1":
102
+ name: keyword.control.tcl
103
+ match: (?<=^|[\[{;])\s*(if|while|for|catch|return|break|continue|switch|exit|foreach)\b
104
+ - captures:
105
+ "1":
106
+ name: keyword.control.tcl
107
+ match: (?<=^|})\s*(then|elseif|else)\b
108
+ - captures:
109
+ "1":
110
+ name: keyword.other.tcl
111
+ "2":
112
+ name: entity.name.function.tcl
113
+ match: ^\s*(proc)\s+([^\s]+)
114
+ - captures:
115
+ "1":
116
+ name: keyword.other.tcl
117
+ match: (?<=^|[\[{;])\s*(after|append|array|auto_execok|auto_import|auto_load|auto_mkindex|auto_mkindex_old|auto_qualify|auto_reset|bgerror|binary|cd|clock|close|concat|dde|encoding|eof|error|eval|exec|expr|fblocked|fconfigure|fcopy|file|fileevent|filename|flush|format|gets|glob|global|history|http|incr|info|interp|join|lappend|library|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|memory|msgcat|namespace|open|package|parray|pid|pkg::create|pkg_mkIndex|proc|puts|pwd|re_syntax|read|registry|rename|resource|scan|seek|set|socket|SafeBase|source|split|string|subst|Tcl|tcl_endOfWord|tcl_findLibrary|tcl_startOfNextWord|tcl_startOfPreviousWord|tcl_wordBreakAfter|tcl_wordBreakBefore|tcltest|tclvars|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait)\b
118
+ - begin: (?<=^|[\[{;])\s*(regexp|regsub)\b\s*
119
+ beginCaptures:
120
+ "1":
121
+ name: keyword.other.tcl
122
+ end: "[\\n;\\]]"
123
+ patterns:
124
+ - name: constant.character.escape.tcl
125
+ match: \\(?:.|\n)
126
+ - match: -\w+\s*
127
+ comment: switch for regexp
128
+ - begin: --\s*
129
+ applyEndPatternLast: 1
130
+ end: ""
131
+ patterns:
132
+ - include: "#regexp"
133
+ comment: end of switches
134
+ - include: "#regexp"
135
+ comment: special-case regexp/regsub keyword in order to handle the expression
136
+ - include: "#escape"
137
+ - include: "#variable"
138
+ - name: string.quoted.double.tcl
139
+ endCaptures:
140
+ "0":
141
+ name: punctuation.definition.string.end.tcl
142
+ begin: "\""
143
+ beginCaptures:
144
+ "0":
145
+ name: punctuation.definition.string.begin.tcl
146
+ end: "\""
147
+ patterns:
148
+ - include: "#escape"
149
+ - include: "#variable"
150
+ - include: "#embedded"
151
+ foldingStopMarker: ^\s*\}
152
+ keyEquivalent: ^~T
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: YAML
3
+ fileTypes:
4
+ - yaml
5
+ - yml
6
+ scopeName: source.yaml
7
+ repository:
8
+ escaped_char:
9
+ name: constant.character.escape.yaml
10
+ match: \\.
11
+ erb:
12
+ name: source.ruby.rails.embedded.html
13
+ captures:
14
+ "0":
15
+ name: punctuation.section.embedded.ruby
16
+ begin: <%+(?!>)=?
17
+ end: "%>"
18
+ patterns:
19
+ - name: comment.line.number-sign.ruby
20
+ captures:
21
+ "1":
22
+ name: punctuation.definition.comment.ruby
23
+ match: (#).*?(?=%>)
24
+ - include: source.ruby.rails
25
+ uuid: B0C44228-4F1F-11DA-AFF2-000A95AF0064
26
+ foldingStartMarker: ^[^#]\s*.*:(\s*\[?| &.+)?$
27
+ patterns:
28
+ - include: "#erb"
29
+ - name: string.unquoted.block.yaml
30
+ begin: ^(\s*)(?:(-)|(?:(-\s*)?(\w+\s*(:))))\s*(\||>)
31
+ beginCaptures:
32
+ "2":
33
+ name: punctuation.definition.entry.yaml
34
+ "3":
35
+ name: punctuation.definition.entry.yaml
36
+ "4":
37
+ name: entity.name.tag.yaml
38
+ "5":
39
+ name: punctuation.separator.key-value.yaml
40
+ end: ^(?!^\1)|^(?=\1(-|\w+\s*:)|#)
41
+ patterns:
42
+ - include: "#erb"
43
+ - name: constant.numeric.yaml
44
+ captures:
45
+ "1":
46
+ name: punctuation.definition.entry.yaml
47
+ "2":
48
+ name: entity.name.tag.yaml
49
+ "3":
50
+ name: punctuation.separator.key-value.yaml
51
+ "4":
52
+ name: punctuation.definition.entry.yaml
53
+ match: (?:(?:(-\s*)?(\w+\s*(:)))|(-))\s*((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\s*$
54
+ - name: string.unquoted.yaml
55
+ captures:
56
+ "1":
57
+ name: punctuation.definition.entry.yaml
58
+ "2":
59
+ name: entity.name.tag.yaml
60
+ "3":
61
+ name: punctuation.separator.key-value.yaml
62
+ "4":
63
+ name: punctuation.definition.entry.yaml
64
+ "5":
65
+ name: string.unquoted.yaml
66
+ match: (?:(?:(-\s*)?(\w+\s*(:)))|(-))\s*([A-Za-z0-9].*)\s*$
67
+ - name: constant.other.date.yaml
68
+ captures:
69
+ "1":
70
+ name: punctuation.definition.entry.yaml
71
+ "2":
72
+ name: entity.name.tag.yaml
73
+ "3":
74
+ name: punctuation.separator.key-value.yaml
75
+ "4":
76
+ name: punctuation.definition.entry.yaml
77
+ match: (?:(?:(-\s*)?(\w+\s*(:)))|(-))\s*([0-9]{4}-[0-9]{2}-[0-9]{2})\s*$
78
+ - name: meta.tag.yaml
79
+ captures:
80
+ "1":
81
+ name: entity.name.tag.yaml
82
+ "2":
83
+ name: punctuation.separator.key-value.yaml
84
+ "3":
85
+ name: keyword.other.omap.yaml
86
+ "4":
87
+ name: punctuation.definition.keyword.yaml
88
+ match: (\w.*?)(:)\s*((\!\!)omap)?
89
+ - name: variable.other.yaml
90
+ captures:
91
+ "1":
92
+ name: punctuation.definition.variable.yaml
93
+ match: (\&|\*)\w.*?$
94
+ - name: string.quoted.double.yaml
95
+ endCaptures:
96
+ "0":
97
+ name: punctuation.definition.string.end.yaml
98
+ begin: "\""
99
+ beginCaptures:
100
+ "0":
101
+ name: punctuation.definition.string.begin.yaml
102
+ end: "\""
103
+ patterns:
104
+ - include: "#escaped_char"
105
+ - include: "#erb"
106
+ - name: string.quoted.single.yaml
107
+ endCaptures:
108
+ "0":
109
+ name: punctuation.definition.string.end.yaml
110
+ begin: "'"
111
+ beginCaptures:
112
+ "0":
113
+ name: punctuation.definition.string.begin.yaml
114
+ end: "'"
115
+ patterns:
116
+ - include: "#escaped_char"
117
+ - include: "#erb"
118
+ - name: string.interpolated.yaml
119
+ endCaptures:
120
+ "0":
121
+ name: punctuation.definition.string.end.yaml
122
+ begin: "`"
123
+ beginCaptures:
124
+ "0":
125
+ name: punctuation.definition.string.begin.yaml
126
+ end: "`"
127
+ patterns:
128
+ - include: "#escaped_char"
129
+ - include: "#erb"
130
+ - name: keyword.operator.merge-key.yaml
131
+ captures:
132
+ "1":
133
+ name: entity.name.tag.yaml
134
+ "2":
135
+ name: keyword.operator.merge-key.yaml
136
+ "3":
137
+ name: punctuation.definition.keyword.yaml
138
+ match: "(\\<\\<): ((\\*).*)$"
139
+ - name: invalid.deprecated.trailing-whitespace.yaml
140
+ disabled: "1"
141
+ match: ( | )+$
142
+ - name: comment.line.number-sign.yaml
143
+ captures:
144
+ "1":
145
+ name: punctuation.definition.comment.yaml
146
+ match: (?<!\$)(#)(?!\{).*$\n?
147
+ - name: keyword.operator.symbol
148
+ match: "-"
149
+ - name: meta.leading-tabs.yaml
150
+ begin: ^(?=\t)
151
+ end: (?=[^\t])
152
+ patterns:
153
+ - captures:
154
+ "1":
155
+ name: meta.odd-tab
156
+ "2":
157
+ name: meta.even-tab
158
+ match: (\t)(\t)?
159
+ foldingStopMarker: ^\s*$|^\s*\}|^\s*\]|^\s*\)
160
+ keyEquivalent: ^~Y