textpow1x 0.11.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/Gemfile +1 -2
  2. data/Gemfile.lock +11 -10
  3. data/README.rdoc +4 -6
  4. data/Rakefile +2 -7
  5. data/lib/textpow.rb +4 -0
  6. data/lib/textpow/syntax/actionscript.syntax +97 -0
  7. data/lib/textpow/syntax/active4d.syntax +276 -0
  8. data/lib/textpow/syntax/active4d_html.syntax +311 -0
  9. data/lib/textpow/syntax/active4d_ini.syntax +50 -0
  10. data/lib/textpow/syntax/active4d_library.syntax +21 -0
  11. data/lib/textpow/syntax/ada.syntax +33 -0
  12. data/lib/textpow/syntax/antlr.syntax +151 -0
  13. data/lib/textpow/syntax/apache.syntax +191 -0
  14. data/lib/textpow/syntax/applescript.syntax +384 -0
  15. data/lib/textpow/syntax/asp.syntax +70 -0
  16. data/lib/textpow/syntax/asp_vb.net.syntax +129 -0
  17. data/lib/textpow/syntax/bibtex.syntax +151 -0
  18. data/lib/textpow/syntax/blog_html.syntax +41 -0
  19. data/lib/textpow/syntax/blog_markdown.syntax +42 -0
  20. data/lib/textpow/syntax/blog_text.syntax +27 -0
  21. data/lib/textpow/syntax/blog_textile.syntax +27 -0
  22. data/lib/textpow/syntax/broken/markdown.syntax +543 -0
  23. data/lib/textpow/syntax/broken/php.syntax +1253 -0
  24. data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
  25. data/lib/textpow/syntax/build.syntax +53 -0
  26. data/lib/textpow/syntax/bulletin_board.syntax +287 -0
  27. data/lib/textpow/syntax/c++.syntax +186 -0
  28. data/lib/textpow/syntax/c.syntax +414 -0
  29. data/lib/textpow/syntax/cake.syntax +55 -0
  30. data/lib/textpow/syntax/camlp4.syntax +36 -0
  31. data/lib/textpow/syntax/cm.syntax +32 -0
  32. data/lib/textpow/syntax/coffeescript.syntax +216 -0
  33. data/lib/textpow/syntax/coldfusion.syntax +119 -0
  34. data/lib/textpow/syntax/context_free.syntax +176 -0
  35. data/lib/textpow/syntax/cs.syntax +59 -0
  36. data/lib/textpow/syntax/css.syntax +195 -0
  37. data/lib/textpow/syntax/css_experimental.syntax +1925 -0
  38. data/lib/textpow/syntax/csv.syntax +68 -0
  39. data/lib/textpow/syntax/d.syntax +142 -0
  40. data/lib/textpow/syntax/diff.syntax +81 -0
  41. data/lib/textpow/syntax/dokuwiki.syntax +204 -0
  42. data/lib/textpow/syntax/dot.syntax +47 -0
  43. data/lib/textpow/syntax/doxygen.syntax +43 -0
  44. data/lib/textpow/syntax/dylan.syntax +62 -0
  45. data/lib/textpow/syntax/eiffel.syntax +78 -0
  46. data/lib/textpow/syntax/erlang.syntax +922 -0
  47. data/lib/textpow/syntax/f-script.syntax +80 -0
  48. data/lib/textpow/syntax/fortran.syntax +141 -0
  49. data/lib/textpow/syntax/fxscript.syntax +142 -0
  50. data/lib/textpow/syntax/greasemonkey.syntax +34 -0
  51. data/lib/textpow/syntax/gri.syntax +83 -0
  52. data/lib/textpow/syntax/groovy.syntax +191 -0
  53. data/lib/textpow/syntax/gtd.syntax +22 -0
  54. data/lib/textpow/syntax/gtdalt.syntax +143 -0
  55. data/lib/textpow/syntax/haml.syntax +88 -0
  56. data/lib/textpow/syntax/haskell.syntax +88 -0
  57. data/lib/textpow/syntax/html-asp.syntax +27 -0
  58. data/lib/textpow/syntax/html.syntax +362 -0
  59. data/lib/textpow/syntax/html_django.syntax +36 -0
  60. data/lib/textpow/syntax/html_for_asp.net.syntax +424 -0
  61. data/lib/textpow/syntax/html_mason.syntax +119 -0
  62. data/lib/textpow/syntax/html_rails.syntax +40 -0
  63. data/lib/textpow/syntax/html_tcl.syntax +26 -0
  64. data/lib/textpow/syntax/icalendar.syntax +32 -0
  65. data/lib/textpow/syntax/inform.syntax +48 -0
  66. data/lib/textpow/syntax/ini.syntax +55 -0
  67. data/lib/textpow/syntax/installer_distribution_script.syntax +77 -0
  68. data/lib/textpow/syntax/io.syntax +81 -0
  69. data/lib/textpow/syntax/java.syntax +211 -0
  70. data/lib/textpow/syntax/javaproperties.syntax +20 -0
  71. data/lib/textpow/syntax/javascript.syntax +256 -0
  72. data/lib/textpow/syntax/javascript_+_prototype.syntax +72 -0
  73. data/lib/textpow/syntax/javascript_+_prototype_bracketed.syntax +140 -0
  74. data/lib/textpow/syntax/jquery_javascript.syntax +114 -0
  75. data/lib/textpow/syntax/json.syntax +136 -0
  76. data/lib/textpow/syntax/languagedefinition.syntax +708 -0
  77. data/lib/textpow/syntax/latex.syntax +566 -0
  78. data/lib/textpow/syntax/latex_beamer.syntax +41 -0
  79. data/lib/textpow/syntax/latex_log.syntax +50 -0
  80. data/lib/textpow/syntax/latex_memoir.syntax +64 -0
  81. data/lib/textpow/syntax/lexflex.syntax +219 -0
  82. data/lib/textpow/syntax/lighttpd.syntax +54 -0
  83. data/lib/textpow/syntax/lilypond.syntax +492 -0
  84. data/lib/textpow/syntax/lisp.syntax +61 -0
  85. data/lib/textpow/syntax/literate_haskell.syntax +24 -0
  86. data/lib/textpow/syntax/logo.syntax +29 -0
  87. data/lib/textpow/syntax/logtalk.syntax +152 -0
  88. data/lib/textpow/syntax/lua.syntax +86 -0
  89. data/lib/textpow/syntax/m.syntax +142 -0
  90. data/lib/textpow/syntax/macports_portfile.syntax +163 -0
  91. data/lib/textpow/syntax/mail.syntax +118 -0
  92. data/lib/textpow/syntax/makefile.syntax +36 -0
  93. data/lib/textpow/syntax/man.syntax +17 -0
  94. data/lib/textpow/syntax/mediawiki.syntax +567 -0
  95. data/lib/textpow/syntax/mel.syntax +92 -0
  96. data/lib/textpow/syntax/mips.syntax +66 -0
  97. data/lib/textpow/syntax/mod_perl.syntax +50 -0
  98. data/lib/textpow/syntax/modula-3.syntax +47 -0
  99. data/lib/textpow/syntax/moinmoin.syntax +189 -0
  100. data/lib/textpow/syntax/mootools.syntax +572 -0
  101. data/lib/textpow/syntax/movable_type.syntax +162 -0
  102. data/lib/textpow/syntax/multimarkdown.syntax +39 -0
  103. data/lib/textpow/syntax/objective-c++.syntax +18 -0
  104. data/lib/textpow/syntax/objective-c.syntax +233 -0
  105. data/lib/textpow/syntax/ocaml.syntax +764 -0
  106. data/lib/textpow/syntax/ocamllex.syntax +167 -0
  107. data/lib/textpow/syntax/ocamlyacc.syntax +184 -0
  108. data/lib/textpow/syntax/old/YAML.yaml +160 -0
  109. data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
  110. data/lib/textpow/syntax/opengl.syntax +14 -0
  111. data/lib/textpow/syntax/pascal.syntax +77 -0
  112. data/lib/textpow/syntax/perl.syntax +1113 -0
  113. data/lib/textpow/syntax/plain_text.syntax +32 -0
  114. data/lib/textpow/syntax/pmwiki.syntax +113 -0
  115. data/lib/textpow/syntax/postscript.syntax +114 -0
  116. data/lib/textpow/syntax/processing.syntax +106 -0
  117. data/lib/textpow/syntax/prolog.syntax +40 -0
  118. data/lib/textpow/syntax/property_list.syntax +635 -0
  119. data/lib/textpow/syntax/python.syntax +868 -0
  120. data/lib/textpow/syntax/python_django.syntax +21 -0
  121. data/lib/textpow/syntax/qmake_project.syntax +114 -0
  122. data/lib/textpow/syntax/qt_c++.syntax +26 -0
  123. data/lib/textpow/syntax/quake3_config.syntax +32 -0
  124. data/lib/textpow/syntax/r.syntax +81 -0
  125. data/lib/textpow/syntax/r_console.syntax +16 -0
  126. data/lib/textpow/syntax/ragel.syntax +201 -0
  127. data/lib/textpow/syntax/rd_r_documentation.syntax +91 -0
  128. data/lib/textpow/syntax/regexp.syntax +50 -0
  129. data/lib/textpow/syntax/regular_expressions_oniguruma.syntax +107 -0
  130. data/lib/textpow/syntax/regular_expressions_python.syntax +109 -0
  131. data/lib/textpow/syntax/release_notes.syntax +46 -0
  132. data/lib/textpow/syntax/remind.syntax +253 -0
  133. data/lib/textpow/syntax/restructuredtext.syntax +250 -0
  134. data/lib/textpow/syntax/rez.syntax +80 -0
  135. data/lib/textpow/syntax/ruby.syntax +1035 -0
  136. data/lib/textpow/syntax/ruby_experimental.syntax +145 -0
  137. data/lib/textpow/syntax/ruby_on_rails.syntax +88 -0
  138. data/lib/textpow/syntax/s5.syntax +69 -0
  139. data/lib/textpow/syntax/sass.syntax +45 -0
  140. data/lib/textpow/syntax/scheme.syntax +347 -0
  141. data/lib/textpow/syntax/scilab.syntax +41 -0
  142. data/lib/textpow/syntax/setext.syntax +147 -0
  143. data/lib/textpow/syntax/shell-unix-generic.syntax +384 -0
  144. data/lib/textpow/syntax/slate.syntax +149 -0
  145. data/lib/textpow/syntax/smarty.syntax +63 -0
  146. data/lib/textpow/syntax/sql.syntax +237 -0
  147. data/lib/textpow/syntax/sql_rails.syntax +18 -0
  148. data/lib/textpow/syntax/ssh-config.syntax +33 -0
  149. data/lib/textpow/syntax/standard_ml.syntax +121 -0
  150. data/lib/textpow/syntax/strings_file.syntax +39 -0
  151. data/lib/textpow/syntax/subversion_commit_message.syntax +36 -0
  152. data/lib/textpow/syntax/sweave.syntax +84 -0
  153. data/lib/textpow/syntax/swig.syntax +57 -0
  154. data/lib/textpow/syntax/tcl.syntax +152 -0
  155. data/lib/textpow/syntax/template_toolkit.syntax +121 -0
  156. data/lib/textpow/syntax/tex.syntax +86 -0
  157. data/lib/textpow/syntax/tex_math.syntax +49 -0
  158. data/lib/textpow/syntax/textile.syntax +215 -0
  159. data/lib/textpow/syntax/tsv.syntax +50 -0
  160. data/lib/textpow/syntax/twiki.syntax +241 -0
  161. data/lib/textpow/syntax/txt2tags.syntax +79 -0
  162. data/lib/textpow/syntax/vectorscript.syntax +57 -0
  163. data/lib/textpow/syntax/xhtml_1.0.syntax +4027 -0
  164. data/lib/textpow/syntax/xml.syntax +180 -0
  165. data/lib/textpow/syntax/xml_strict.syntax +92 -0
  166. data/lib/textpow/syntax/xsl.syntax +60 -0
  167. data/lib/textpow/syntax/yaml.syntax +160 -0
  168. data/lib/textpow/syntax/yui_javascript.syntax +176 -0
  169. data/lib/textpow/version.rb +2 -2
  170. data/spec/spec_helper.rb +2 -0
  171. data/spec/textpow_spec.rb +34 -0
  172. metadata +169 -5
  173. data/test/textpow_test.rb +0 -24
@@ -0,0 +1,414 @@
1
+ ---
2
+ fileTypes:
3
+ - c
4
+ - h
5
+ firstLineMatch: -[*]-( Mode:)? C -[*]-
6
+ foldingStartMarker: "(?x)\n\
7
+ \t\t /\\*\\*(?!\\*)\n\
8
+ \t\t|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))\n\
9
+ \t"
10
+ foldingStopMarker: (?<!\*)\*\*/|^\s*\}
11
+ keyEquivalent: ^~C
12
+ name: C
13
+ patterns:
14
+ - include: "#preprocessor-rule-enabled"
15
+ - include: "#preprocessor-rule-disabled"
16
+ - include: "#preprocessor-rule-other"
17
+ - include: "#comments"
18
+ - match: \b(break|case|continue|default|do|else|for|goto|if|_Pragma|return|switch|while)\b
19
+ name: keyword.control.c
20
+ - match: \b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\b
21
+ name: storage.type.c
22
+ - match: \b(const|extern|register|restrict|static|volatile|inline)\b
23
+ name: storage.modifier.c
24
+ - comment: common C constant naming idiom -- kConstantVariable
25
+ match: \bk[A-Z]\w*\b
26
+ name: constant.other.variable.mac-classic.c
27
+ - match: \bg[A-Z]\w*\b
28
+ name: variable.other.readwrite.global.mac-classic.c
29
+ - match: \bs[A-Z]\w*\b
30
+ name: variable.other.readwrite.static.mac-classic.c
31
+ - match: \b(NULL|true|false|TRUE|FALSE)\b
32
+ name: constant.language.c
33
+ - include: "#sizeof"
34
+ - match: \b((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|ll|LL|ull|ULL)?\b
35
+ name: constant.numeric.c
36
+ - begin: "\""
37
+ beginCaptures:
38
+ "0":
39
+ name: punctuation.definition.string.begin.c
40
+ end: "\""
41
+ endCaptures:
42
+ "0":
43
+ name: punctuation.definition.string.end.c
44
+ name: string.quoted.double.c
45
+ patterns:
46
+ - include: "#string_escaped_char"
47
+ - include: "#string_placeholder"
48
+ - begin: "&apos;"
49
+ beginCaptures:
50
+ "0":
51
+ name: punctuation.definition.string.begin.c
52
+ end: "&apos;"
53
+ endCaptures:
54
+ "0":
55
+ name: punctuation.definition.string.end.c
56
+ name: string.quoted.single.c
57
+ patterns:
58
+ - include: "#string_escaped_char"
59
+ - begin: "(?x)\n \t\t^\\s*\\#\\s*(define)\\s+ # define\n \t\t((?<id>[a-zA-Z_][a-zA-Z0-9_]*)) # macro name\n \t\t(?: # and optionally:\n \t\t (\\() # an open parenthesis\n \t\t (\n \t\t \\s* \\g<id> \\s* # first argument\n \t\t ((,) \\s* \\g<id> \\s*)* # additional arguments\n \t\t (?:\\.\\.\\.)? # varargs ellipsis?\n \t\t )\n \t\t (\\)) # a close parenthesis\n \t\t)?\n \t"
60
+ beginCaptures:
61
+ "1":
62
+ name: keyword.control.import.define.c
63
+ "2":
64
+ name: entity.name.function.preprocessor.c
65
+ "4":
66
+ name: punctuation.definition.parameters.c
67
+ "5":
68
+ name: variable.parameter.preprocessor.c
69
+ "7":
70
+ name: punctuation.separator.parameters.c
71
+ "8":
72
+ name: punctuation.definition.parameters.c
73
+ end: (?=(?://|/\*))|$
74
+ name: meta.preprocessor.macro.c
75
+ patterns:
76
+ - match: (?>\\\s*\n)
77
+ name: punctuation.separator.continuation.c
78
+ - include: $base
79
+ - begin: ^\s*#\s*(error|warning)\b
80
+ captures:
81
+ "1":
82
+ name: keyword.control.import.error.c
83
+ end: $
84
+ name: meta.preprocessor.diagnostic.c
85
+ patterns:
86
+ - match: (?>\\\s*\n)
87
+ name: punctuation.separator.continuation.c
88
+ - begin: ^\s*#\s*(include|import)\b\s+
89
+ captures:
90
+ "1":
91
+ name: keyword.control.import.include.c
92
+ end: (?=(?://|/\*))|$
93
+ name: meta.preprocessor.c.include
94
+ patterns:
95
+ - match: (?>\\\s*\n)
96
+ name: punctuation.separator.continuation.c
97
+ - begin: "\""
98
+ beginCaptures:
99
+ "0":
100
+ name: punctuation.definition.string.begin.c
101
+ end: "\""
102
+ endCaptures:
103
+ "0":
104
+ name: punctuation.definition.string.end.c
105
+ name: string.quoted.double.include.c
106
+ - begin: <
107
+ beginCaptures:
108
+ "0":
109
+ name: punctuation.definition.string.begin.c
110
+ end: ">"
111
+ endCaptures:
112
+ "0":
113
+ name: punctuation.definition.string.end.c
114
+ name: string.quoted.other.lt-gt.include.c
115
+ - include: "#pragma-mark"
116
+ - begin: ^\s*#\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\b
117
+ captures:
118
+ "1":
119
+ name: keyword.control.import.c
120
+ end: (?=(?://|/\*))|$
121
+ name: meta.preprocessor.c
122
+ patterns:
123
+ - match: (?>\\\s*\n)
124
+ name: punctuation.separator.continuation.c
125
+ - match: \b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\b
126
+ name: support.type.sys-types.c
127
+ - match: \b(pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\b
128
+ name: support.type.pthread.c
129
+ - match: \b(int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\b
130
+ name: support.type.stdint.c
131
+ - match: \b(noErr|kNilOptions|kInvalidID|kVariableLengthArray)\b
132
+ name: support.constant.mac-classic.c
133
+ - match: \b(AbsoluteTime|Boolean|Byte|ByteCount|ByteOffset|BytePtr|CompTimeValue|ConstLogicalAddress|ConstStrFileNameParam|ConstStringPtr|Duration|Fixed|FixedPtr|Float32|Float32Point|Float64|Float80|Float96|FourCharCode|Fract|FractPtr|Handle|ItemCount|LogicalAddress|OptionBits|OSErr|OSStatus|OSType|OSTypePtr|PhysicalAddress|ProcessSerialNumber|ProcessSerialNumberPtr|ProcHandle|Ptr|ResType|ResTypePtr|ShortFixed|ShortFixedPtr|SignedByte|SInt16|SInt32|SInt64|SInt8|Size|StrFileName|StringHandle|StringPtr|TimeBase|TimeRecord|TimeScale|TimeValue|TimeValue64|UInt16|UInt32|UInt64|UInt8|UniChar|UniCharCount|UniCharCountPtr|UniCharPtr|UnicodeScalarValue|UniversalProcHandle|UniversalProcPtr|UnsignedFixed|UnsignedFixedPtr|UnsignedWide|UTF16Char|UTF32Char|UTF8Char)\b
134
+ name: support.type.mac-classic.c
135
+ - include: "#block"
136
+ - begin: |-
137
+ (?x)
138
+ (?: ^ # begin-of-line
139
+ |
140
+ (?: (?= \s ) (?<!else|new|return) (?<=\w) # or word + space before name
141
+ | (?= \s*[A-Za-z_] ) (?<!&&) (?<=[*&>]) # or type modifier before name
142
+ )
143
+ )
144
+ (\s*) (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()
145
+ (
146
+ (?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name
147
+ (?: (?<=operator) (?: [-*&<>=+!]+ | \(\) | \[\] ) ) # if it is a C++ operator
148
+ )
149
+ \s*(?=\()
150
+ beginCaptures:
151
+ "1":
152
+ name: punctuation.whitespace.function.leading.c
153
+ "3":
154
+ name: entity.name.function.c
155
+ "4":
156
+ name: punctuation.definition.parameters.c
157
+ end: (?<=\})|(?=#)|(;)
158
+ name: meta.function.c
159
+ patterns:
160
+ - include: "#comments"
161
+ - include: "#parens"
162
+ - match: \bconst\b
163
+ name: storage.modifier.c
164
+ - include: "#block"
165
+ repository:
166
+ access:
167
+ match: \.[a-zA-Z_][a-zA-Z_0-9]*\b(?!\s*\()
168
+ name: variable.other.dot-access.c
169
+ block:
170
+ begin: \{
171
+ end: \}
172
+ name: meta.block.c
173
+ patterns:
174
+ - include: "#block_innards"
175
+ block_innards:
176
+ patterns:
177
+ - include: "#preprocessor-rule-enabled-block"
178
+ - include: "#preprocessor-rule-disabled-block"
179
+ - include: "#preprocessor-rule-other-block"
180
+ - include: "#sizeof"
181
+ - include: "#access"
182
+ - captures:
183
+ "1":
184
+ name: punctuation.whitespace.support.function.leading.c
185
+ "2":
186
+ name: support.function.C99.c
187
+ match: (\s*)\b(hypot(f|l)?|s(scanf|ystem|nprintf|ca(nf|lb(n(f|l)?|ln(f|l)?))|i(n(h(f|l)?|f|l)?|gn(al|bit))|tr(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(jmp|vbuf|locale|buf)|qrt(f|l)?|w(scanf|printf)|rand)|n(e(arbyint(f|l)?|xt(toward(f|l)?|after(f|l)?))|an(f|l)?)|c(s(in(h(f|l)?|f|l)?|qrt(f|l)?)|cos(h(f)?|f|l)?|imag(f|l)?|t(ime|an(h(f|l)?|f|l)?)|o(s(h(f|l)?|f|l)?|nj(f|l)?|pysign(f|l)?)|p(ow(f|l)?|roj(f|l)?)|e(il(f|l)?|xp(f|l)?)|l(o(ck|g(f|l)?)|earerr)|a(sin(h(f|l)?|f|l)?|cos(h(f|l)?|f|l)?|tan(h(f|l)?|f|l)?|lloc|rg(f|l)?|bs(f|l)?)|real(f|l)?|brt(f|l)?)|t(ime|o(upper|lower)|an(h(f|l)?|f|l)?|runc(f|l)?|gamma(f|l)?|mp(nam|file))|i(s(space|n(ormal|an)|cntrl|inf|digit|u(nordered|pper)|p(unct|rint)|finite|w(space|c(ntrl|type)|digit|upper|p(unct|rint)|lower|al(num|pha)|graph|xdigit|blank)|l(ower|ess(equal|greater)?)|al(num|pha)|gr(eater(equal)?|aph)|xdigit|blank)|logb(f|l)?|max(div|abs))|di(v|fftime)|_Exit|unget(c|wc)|p(ow(f|l)?|ut(s|c(har)?|wc(har)?)|error|rintf)|e(rf(c(f|l)?|f|l)?|x(it|p(2(f|l)?|f|l|m1(f|l)?)?))|v(s(scanf|nprintf|canf|printf|w(scanf|printf))|printf|f(scanf|printf|w(scanf|printf))|w(scanf|printf)|a_(start|copy|end|arg))|qsort|f(s(canf|e(tpos|ek))|close|tell|open|dim(f|l)?|p(classify|ut(s|c|w(s|c))|rintf)|e(holdexcept|set(e(nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(aiseexcept|ror)|get(e(nv|xceptflag)|round))|flush|w(scanf|ide|printf|rite)|loor(f|l)?|abs(f|l)?|get(s|c|pos|w(s|c))|re(open|e|ad|xp(f|l)?)|m(in(f|l)?|od(f|l)?|a(f|l|x(f|l)?)?))|l(d(iv|exp(f|l)?)|o(ngjmp|cal(time|econv)|g(1(p(f|l)?|0(f|l)?)|2(f|l)?|f|l|b(f|l)?)?)|abs|l(div|abs|r(int(f|l)?|ound(f|l)?))|r(int(f|l)?|ound(f|l)?)|gamma(f|l)?)|w(scanf|c(s(s(tr|pn)|nc(py|at|mp)|c(spn|hr|oll|py|at|mp)|to(imax|d|u(l(l)?|max)|k|f|l(d|l)?|mbs)|pbrk|ftime|len|r(chr|tombs)|xfrm)|to(b|mb)|rtomb)|printf|mem(set|c(hr|py|mp)|move))|a(s(sert|ctime|in(h(f|l)?|f|l)?)|cos(h(f|l)?|f|l)?|t(o(i|f|l(l)?)|exit|an(h(f|l)?|2(f|l)?|f|l)?)|b(s|ort))|g(et(s|c(har)?|env|wc(har)?)|mtime)|r(int(f|l)?|ound(f|l)?|e(name|alloc|wind|m(ove|quo(f|l)?|ainder(f|l)?))|a(nd|ise))|b(search|towc)|m(odf(f|l)?|em(set|c(hr|py|mp)|move)|ktime|alloc|b(s(init|towcs|rtowcs)|towc|len|r(towc|len))))\b
188
+ - captures:
189
+ "1":
190
+ name: punctuation.whitespace.function-call.leading.c
191
+ "2":
192
+ name: support.function.any-method.c
193
+ "3":
194
+ name: punctuation.definition.parameters.c
195
+ match: |-
196
+ (?x) (?: (?= \s ) (?:(?<=else|new|return) | (?<!\w)) (\s+))?
197
+ (\b
198
+ (?!(while|for|do|if|else|switch|catch|enumerate|return|r?iterate)\s*\()(?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\b | :: )++ # actual name
199
+ )
200
+ \s*(\()
201
+ name: meta.function-call.c
202
+ - captures:
203
+ "1":
204
+ name: variable.other.c
205
+ "2":
206
+ name: punctuation.definition.parameters.c
207
+ match: |-
208
+ (?x)
209
+ (?x)
210
+ (?:
211
+ (?: (?= \s ) (?<!else|new|return) (?<=\w)\s+ # or word + space before name
212
+ )
213
+ )
214
+ (
215
+ (?: [A-Za-z_][A-Za-z0-9_]*+ | :: )++ | # actual name
216
+ (?: (?<=operator) (?: [-*&<>=+!]+ | \(\) | \[\] ) )? # if it is a C++ operator
217
+ )
218
+ \s*(\()
219
+ name: meta.initialization.c
220
+ - include: "#block"
221
+ - include: $base
222
+ comments:
223
+ patterns:
224
+ - captures:
225
+ "1":
226
+ name: meta.toc-list.banner.block.c
227
+ match: ^/\* =(\s*.*?)\s*= \*/$\n?
228
+ name: comment.block.c
229
+ - begin: /\*
230
+ captures:
231
+ "0":
232
+ name: punctuation.definition.comment.c
233
+ end: \*/
234
+ name: comment.block.c
235
+ - match: \*/.*\n
236
+ name: invalid.illegal.stray-comment-end.c
237
+ - captures:
238
+ "1":
239
+ name: meta.toc-list.banner.line.c
240
+ match: ^// =(\s*.*?)\s*=\s*$\n?
241
+ name: comment.line.banner.c++
242
+ - begin: //
243
+ beginCaptures:
244
+ "0":
245
+ name: punctuation.definition.comment.c
246
+ end: $\n?
247
+ name: comment.line.double-slash.c++
248
+ patterns:
249
+ - match: (?>\\\s*\n)
250
+ name: punctuation.separator.continuation.c++
251
+ disabled:
252
+ begin: ^\s*#\s*if(n?def)?\b.*$
253
+ comment: eat nested preprocessor if(def)s
254
+ end: ^\s*#\s*endif\b.*$
255
+ patterns:
256
+ - include: "#disabled"
257
+ - include: "#pragma-mark"
258
+ parens:
259
+ begin: \(
260
+ end: \)
261
+ name: meta.parens.c
262
+ patterns:
263
+ - include: $base
264
+ pragma-mark:
265
+ captures:
266
+ "1":
267
+ name: meta.preprocessor.c
268
+ "2":
269
+ name: keyword.control.import.pragma.c
270
+ "3":
271
+ name: meta.toc-list.pragma-mark.c
272
+ match: ^\s*(#\s*(pragma\s+mark)\s+(.*))
273
+ name: meta.section
274
+ preprocessor-rule-disabled:
275
+ begin: ^\s*(#(if)\s+(0)\b).*
276
+ captures:
277
+ "1":
278
+ name: meta.preprocessor.c
279
+ "2":
280
+ name: keyword.control.import.if.c
281
+ "3":
282
+ name: constant.numeric.preprocessor.c
283
+ end: ^\s*(#\s*(endif)\b)
284
+ patterns:
285
+ - begin: ^\s*(#\s*(else)\b)
286
+ captures:
287
+ "1":
288
+ name: meta.preprocessor.c
289
+ "2":
290
+ name: keyword.control.import.else.c
291
+ end: (?=^\s*#\s*endif\b.*$)
292
+ patterns:
293
+ - include: $base
294
+ - begin: ""
295
+ end: (?=^\s*#\s*(else|endif)\b.*$)
296
+ name: comment.block.preprocessor.if-branch
297
+ patterns:
298
+ - include: "#disabled"
299
+ - include: "#pragma-mark"
300
+ preprocessor-rule-disabled-block:
301
+ begin: ^\s*(#(if)\s+(0)\b).*
302
+ captures:
303
+ "1":
304
+ name: meta.preprocessor.c
305
+ "2":
306
+ name: keyword.control.import.if.c
307
+ "3":
308
+ name: constant.numeric.preprocessor.c
309
+ end: ^\s*(#\s*(endif)\b)
310
+ patterns:
311
+ - begin: ^\s*(#\s*(else)\b)
312
+ captures:
313
+ "1":
314
+ name: meta.preprocessor.c
315
+ "2":
316
+ name: keyword.control.import.else.c
317
+ end: (?=^\s*#\s*endif\b.*$)
318
+ patterns:
319
+ - include: "#block_innards"
320
+ - begin: ""
321
+ end: (?=^\s*#\s*(else|endif)\b.*$)
322
+ name: comment.block.preprocessor.if-branch.in-block
323
+ patterns:
324
+ - include: "#disabled"
325
+ - include: "#pragma-mark"
326
+ preprocessor-rule-enabled:
327
+ begin: ^\s*(#(if)\s+(0*1)\b)
328
+ captures:
329
+ "1":
330
+ name: meta.preprocessor.c
331
+ "2":
332
+ name: keyword.control.import.if.c
333
+ "3":
334
+ name: constant.numeric.preprocessor.c
335
+ end: ^\s*(#\s*(endif)\b)
336
+ patterns:
337
+ - begin: ^\s*(#\s*(else)\b).*
338
+ captures:
339
+ "1":
340
+ name: meta.preprocessor.c
341
+ "2":
342
+ name: keyword.control.import.else.c
343
+ contentName: comment.block.preprocessor.else-branch
344
+ end: (?=^\s*#\s*endif\b.*$)
345
+ patterns:
346
+ - include: "#disabled"
347
+ - include: "#pragma-mark"
348
+ - begin: ""
349
+ end: (?=^\s*#\s*(else|endif)\b.*$)
350
+ patterns:
351
+ - include: $base
352
+ preprocessor-rule-enabled-block:
353
+ begin: ^\s*(#(if)\s+(0*1)\b)
354
+ captures:
355
+ "1":
356
+ name: meta.preprocessor.c
357
+ "2":
358
+ name: keyword.control.import.if.c
359
+ "3":
360
+ name: constant.numeric.preprocessor.c
361
+ end: ^\s*(#\s*(endif)\b)
362
+ patterns:
363
+ - begin: ^\s*(#\s*(else)\b).*
364
+ captures:
365
+ "1":
366
+ name: meta.preprocessor.c
367
+ "2":
368
+ name: keyword.control.import.else.c
369
+ contentName: comment.block.preprocessor.else-branch.in-block
370
+ end: (?=^\s*#\s*endif\b.*$)
371
+ patterns:
372
+ - include: "#disabled"
373
+ - include: "#pragma-mark"
374
+ - begin: ""
375
+ end: (?=^\s*#\s*(else|endif)\b.*$)
376
+ patterns:
377
+ - include: "#block_innards"
378
+ preprocessor-rule-other:
379
+ begin: ^\s*(#\s*(if(n?def)?)\b.*?(?:(?=(?://|/\*))|$))
380
+ captures:
381
+ "1":
382
+ name: meta.preprocessor.c
383
+ "2":
384
+ name: keyword.control.import.c
385
+ end: ^\s*(#\s*(endif)\b).*$
386
+ patterns:
387
+ - include: $base
388
+ preprocessor-rule-other-block:
389
+ begin: ^\s*(#\s*(if(n?def)?)\b.*?(?:(?=(?://|/\*))|$))
390
+ captures:
391
+ "1":
392
+ name: meta.preprocessor.c
393
+ "2":
394
+ name: keyword.control.import.c
395
+ end: ^\s*(#\s*(endif)\b).*$
396
+ patterns:
397
+ - include: "#block_innards"
398
+ sizeof:
399
+ match: \b(sizeof)\b
400
+ name: keyword.operator.sizeof.c
401
+ string_escaped_char:
402
+ patterns:
403
+ - match: \\(\\|[abefnprtv&apos;"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})
404
+ name: constant.character.escape.c
405
+ - match: \\.
406
+ name: invalid.illegal.unknown-escape.c
407
+ string_placeholder:
408
+ patterns:
409
+ - match: "(?x)%\n \t\t\t\t\t\t(\\d+\\$)? # field (argument #)\n \t\t\t\t\t\t[#0\\- +&apos;]* # flags\n \t\t\t\t\t\t[,;:_]? # separator character (AltiVec)\n \t\t\t\t\t\t((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n \t\t\t\t\t\t(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n \t\t\t\t\t\t(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n \t\t\t\t\t\t[diouxXDOUeEfFgGaACcSspn%] # conversion type\n \t\t\t\t\t"
410
+ name: constant.other.placeholder.c
411
+ - match: "%"
412
+ name: invalid.illegal.placeholder.c
413
+ scopeName: source.c
414
+ uuid: 25066DC2-6B1D-11D9-9D5B-000D93589AF6
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: Cake
3
+ fileTypes:
4
+ - thtml
5
+ scopeName: source.php.cake
6
+ uuid: 3DF2FE0B-94CC-4EE2-A50A-BD4823D1B09D
7
+ foldingStartMarker: (/\*|\{|\()
8
+ patterns:
9
+ - name: support.function.model.cake
10
+ match: \b(bindModel|unbindModel|hasField|read|field|save|saveField|remove|del|delete|exists|hasAny|find|findAll|findCount|execute|query|validates|invalidate|invalidFields|isForeignKey|getDisplayField|generateList|getID|getLastInsertID|getInsertID|getNumRows|getAffectedRows|setDatasource|beforeFind|afterFind|beforeSave|afterSave|beforeDelete|afterDelete)\b
11
+ - name: support.function.controller.cake
12
+ match: \b(redirect|set|setAction|validate|validateErrors|render|referer|flash|flashOut|generateFieldNames|postCondtions|cleanUpFields|beforeFilter|beforeRender|afterFilter)\b
13
+ - name: support.constant.core.cake
14
+ match: \b(ACL_CLASSNAME|ACL_FILENAME|APP|APP_DIR|APP_PATH|AUTO_OUTPUT|AUTO_SESSION|CACHE|CACHE_CHECK|CAKE|CAKE_CORE_INCLUDE_PATH|CAKE_SECURITY|CAKE_SESSION_COOKIE|CAKE_SESSION_SAVE|CAKE_SESSION_STRING|CAKE_SESSION_TIMEOUT|COMPONENTS|COMPRESS_CSS|CONFIGS|CONTROLLER_TESTS|CONTROLLERS|CORE_PATH|CSS|DAY|DEBUG|DS|ELEMENTS|HELPER_TESTS|HELPERS|HOUR|INFLECTIONS|JS|LAYOUTS|LIB_TESTS|LIBS|LOG_ERROR|LOGS|MAX_MD5SIZE|MINUTE|MODEL_TESTS|MODELS|MODULES|MONTH|PEAR|ROOT|SCRIPTS|SECOND|TAG_DIV|TAG_FIELDSET|TAG_LABEL|TAG_P_CLASS|TESTS|TMP|VALID_EMAIL|VALID_NOT_EMPTY|VALID_NUMBER|VALID_YEAR|VENDORS|VIEWS|WEBROOT_DIR|WEBSERVICES|WEEK|WWW_ROOT|YEAR)\b
15
+ - name: invalid.deprecated.model.cake
16
+ match: \b(setId|findBySql)\b
17
+ - name: invalid.deprecated.helper.html.cake
18
+ match: \b(areaTag|charsetTag|checkboxTag|contentTag|cssTag|fileTag|formTag|guiListTag|hiddenTag|imageTag|inputTag|javascriptIncludeTag|javascriptTag|linkEmail|linkOut|linkTo|parseHtmlOptions|passwordTag|radioTags|submitTag|tag|urlFor)\b
19
+ - name: invalid.deprecated.helper.ajax.cake
20
+ match: \b(linkToRemote)\b
21
+ - name: support.function.helper.cake
22
+ match: \b(isFieldError|labelTag|divTag|pTag|generate(Input|Checkbox|Area|Select|submit)Div|generate(Date|DateTime|Fields))\b
23
+ - name: support.function.helper.html.cake
24
+ match: \b(addCrumb|charset|url|link|submit|password|textarea|checkbox|css|file|getCrumbs|hidden|image|input|radio|tableHeaders|tableCells|validate|tagIsValid|validateErrors|tagErrorMsg|selectTag|(day|year|month|hour|minute|meridian|date)OptionTag)\b
25
+ - name: support.function.helper.ajax.cake
26
+ match: \b(link|remoteFunction|remoteTimer|form|submit|observe(Field|Form)|autoComplete|drag|drop|dropRemote|slider|editor|sortable)\b
27
+ - name: support.function.file.cake
28
+ match: \b(read|append|write|get(Md5|Size|Ext|Name|Owner|Group|Folder|Chmod|FullPath)|create|exists|delete|writable|executable|readable|last(Access|Change))\b
29
+ - name: support.function.log.cake
30
+ match: \b(write)\b
31
+ - name: support.function.helper.number.cake
32
+ match: \b(precision|toReadableSize|toPercentage)\b
33
+ - name: support.function.component.requestHandler.cake
34
+ match: \b(startup|setAjax|is(Ajax|Xml|Rss|Atom|Post|Get|Delete|Mobile)|getAjaxVersion|setContent|get(Referer|ClientIP)|strip(WhiteSpace|Images|Scripts|All|tags)|accepts|prefers)\b
35
+ - name: support.function.component.session.cake
36
+ match: \b(write|read|del|delete|check|error|setFlash|flash|renew|valid)\b
37
+ - name: support.function.component.security.cake
38
+ match: \b(startup|blackHole|requirePost|requireAuth)\b
39
+ - name: support.function.component.sanitize.cake
40
+ match: \b(paranoid|sql|html|cleanArray|cleanArrayR|cleanValue|formatColumns)\b
41
+ - name: support.function.helper.time.cake
42
+ match: \b(trim|fromString|nice|niceShort|isToday|daysAsSql|dayAsSql|isThisYear|wasYesterday|isTomorrow|toUnix|toAtom|toRSS|timeAgoInWords|relativeTime|wasWithinLast)\b
43
+ - name: support.function.helper.text.cake
44
+ match: \b(highlight|stripLinks|autoLinkUrls|autoLinkEmails|autoLink|truncate|excerpt|flay)\b
45
+ - name: support.function.helper.javascript.cake
46
+ match: \b(codeBlock|link|linkOut|escape(String|Script)|event|(cache|write)Events|includeScript|object)\b
47
+ - name: support.function.neatArray.cake
48
+ match: \b(findIn|cleanup|add|plus|totals|filter|walk|sprintf|extract|unique|makeUnique|joinWith|threaded|multi_search)\b
49
+ - name: support.function.neatString.cake
50
+ match: \b(toArray|toRoman|toCompressed|randomPassword)\b
51
+ - name: support.function.basics.cake
52
+ match: \b(load(Models|PluginModels|View|Model|Controllers|PluginController)|listClasses|config|gendor|debug|aa|ha|a|e|low|up|r|pr|params|am|setUri|env|cache|clearCache|stripslashes_deep|countDim|LogError|fileExistsInPAth|convertSlash)\b
53
+ - include: source.php
54
+ - include: text.html.basic
55
+ foldingStopMarker: (\*/|\}|\))