textpow 0.10.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +30 -0
- data/{History.txt → History.rdoc} +10 -0
- data/{README.txt → MIT-LICENSE.txt} +0 -30
- data/README.rdoc +82 -0
- data/Rakefile +42 -49
- data/bin/plist2syntax +0 -0
- data/bin/plist2yaml +0 -0
- data/examples/benchmark_js.rb +13 -0
- data/examples/jquery.js +9046 -0
- data/lib/textpow.rb +43 -3
- data/lib/textpow/debug_processor.rb +35 -35
- data/lib/textpow/recording_processor.rb +13 -0
- data/lib/textpow/score_manager.rb +60 -60
- data/lib/textpow/syntax.rb +303 -262
- data/lib/textpow/syntax/broken/markdown.syntax +519 -0
- data/lib/textpow/syntax/broken/php.syntax +1253 -0
- data/lib/textpow/syntax/buggy/nemerle.syntax +74 -0
- data/lib/textpow/syntax/old/YAML.yaml +160 -0
- data/lib/textpow/syntax/old/txt2tags.yaml +139 -0
- data/lib/textpow/syntax/source.actionscript.syntax +97 -0
- data/lib/textpow/syntax/source.active4d.library.syntax +21 -0
- data/lib/textpow/syntax/source.active4d.syntax +276 -0
- data/lib/textpow/syntax/source.ada.syntax +33 -0
- data/lib/textpow/syntax/source.antlr.syntax +151 -0
- data/lib/textpow/syntax/source.apache-config.mod_perl.syntax +50 -0
- data/lib/textpow/syntax/source.apache-config.syntax +191 -0
- data/lib/textpow/syntax/source.applescript.syntax +384 -0
- data/lib/textpow/syntax/source.asp.syntax +70 -0
- data/lib/textpow/syntax/source.asp.vb.net.syntax +129 -0
- data/lib/textpow/syntax/source.c++.qt.syntax +26 -0
- data/lib/textpow/syntax/source.c++.syntax +186 -0
- data/lib/textpow/syntax/source.c-sharp.syntax +59 -0
- data/lib/textpow/syntax/source.c.ragel.syntax +201 -0
- data/lib/textpow/syntax/source.c.syntax +414 -0
- data/lib/textpow/syntax/source.camlp4.ocaml.syntax +36 -0
- data/lib/textpow/syntax/source.cm.syntax +32 -0
- data/lib/textpow/syntax/source.coffee.syntax +216 -0
- data/lib/textpow/syntax/source.context-free.syntax +176 -0
- data/lib/textpow/syntax/source.css.beta.syntax +1925 -0
- data/lib/textpow/syntax/source.css.syntax +195 -0
- data/lib/textpow/syntax/source.d.syntax +142 -0
- data/lib/textpow/syntax/source.diff.syntax +81 -0
- data/lib/textpow/syntax/source.dot.syntax +47 -0
- data/lib/textpow/syntax/source.dylan.syntax +62 -0
- data/lib/textpow/syntax/source.eiffel.syntax +78 -0
- data/lib/textpow/syntax/source.erlang.syntax +922 -0
- data/lib/textpow/syntax/source.fortran.syntax +141 -0
- data/lib/textpow/syntax/source.fscript.syntax +80 -0
- data/lib/textpow/syntax/source.fxscript.syntax +142 -0
- data/lib/textpow/syntax/source.gri.syntax +83 -0
- data/lib/textpow/syntax/source.groovy.groovy.syntax +191 -0
- data/lib/textpow/syntax/source.haskell.syntax +88 -0
- data/lib/textpow/syntax/source.icalendar.syntax +32 -0
- data/lib/textpow/syntax/source.inform.syntax +48 -0
- data/lib/textpow/syntax/source.ini.syntax +55 -0
- data/lib/textpow/syntax/source.io.syntax +81 -0
- data/lib/textpow/syntax/source.java-props.syntax +20 -0
- data/lib/textpow/syntax/source.java.syntax +211 -0
- data/lib/textpow/syntax/source.js.greasemonkey.syntax +34 -0
- data/lib/textpow/syntax/source.js.jquery.syntax +114 -0
- data/lib/textpow/syntax/source.js.mootools.syntax +572 -0
- data/lib/textpow/syntax/source.js.prototype.bracketed.syntax +140 -0
- data/lib/textpow/syntax/source.js.prototype.syntax +72 -0
- data/lib/textpow/syntax/source.js.syntax +256 -0
- data/lib/textpow/syntax/source.js.yui.syntax +176 -0
- data/lib/textpow/syntax/source.json.syntax +136 -0
- data/lib/textpow/syntax/source.lex.syntax +219 -0
- data/lib/textpow/syntax/source.lighttpd-config.syntax +54 -0
- data/lib/textpow/syntax/source.lilypond.syntax +492 -0
- data/lib/textpow/syntax/source.lisp.syntax +61 -0
- data/lib/textpow/syntax/source.logo.syntax +29 -0
- data/lib/textpow/syntax/source.logtalk.syntax +152 -0
- data/lib/textpow/syntax/source.lua.syntax +86 -0
- data/lib/textpow/syntax/source.makefile.syntax +36 -0
- data/lib/textpow/syntax/source.matlab.syntax +142 -0
- data/lib/textpow/syntax/source.mel.syntax +92 -0
- data/lib/textpow/syntax/source.mips.syntax +66 -0
- data/lib/textpow/syntax/source.ml.syntax +121 -0
- data/lib/textpow/syntax/source.modula-3.syntax +47 -0
- data/lib/textpow/syntax/source.nant-build.syntax +53 -0
- data/lib/textpow/syntax/source.objc++.syntax +18 -0
- data/lib/textpow/syntax/source.objc.syntax +233 -0
- data/lib/textpow/syntax/source.ocaml.syntax +764 -0
- data/lib/textpow/syntax/source.ocamllex.syntax +167 -0
- data/lib/textpow/syntax/source.ocamlyacc.syntax +184 -0
- data/lib/textpow/syntax/source.open-gl.syntax +14 -0
- data/lib/textpow/syntax/source.pascal.syntax +77 -0
- data/lib/textpow/syntax/source.pascal.vectorscript.syntax +57 -0
- data/lib/textpow/syntax/source.perl.syntax +1113 -0
- data/lib/textpow/syntax/source.php.cake.syntax +55 -0
- data/lib/textpow/syntax/source.plist.tm-grammar.syntax +708 -0
- data/lib/textpow/syntax/source.postscript.syntax +114 -0
- data/lib/textpow/syntax/source.processing.syntax +106 -0
- data/lib/textpow/syntax/source.prolog.syntax +40 -0
- data/lib/textpow/syntax/source.python.django.syntax +21 -0
- data/lib/textpow/syntax/source.python.syntax +868 -0
- data/lib/textpow/syntax/source.qmake.syntax +114 -0
- data/lib/textpow/syntax/source.quake-config.syntax +32 -0
- data/lib/textpow/syntax/source.r-console.syntax +16 -0
- data/lib/textpow/syntax/source.r.syntax +81 -0
- data/lib/textpow/syntax/source.regexp.oniguruma.syntax +107 -0
- data/lib/textpow/syntax/source.regexp.python.syntax +109 -0
- data/lib/textpow/syntax/source.regexp.syntax +50 -0
- data/lib/textpow/syntax/source.remind.syntax +253 -0
- data/lib/textpow/syntax/source.rez.syntax +80 -0
- data/lib/textpow/syntax/source.ruby.experimental.syntax +145 -0
- data/lib/textpow/syntax/source.ruby.rails.syntax +88 -0
- data/lib/textpow/syntax/source.ruby.syntax +1035 -0
- data/lib/textpow/syntax/source.s5.syntax +69 -0
- data/lib/textpow/syntax/source.sass.syntax +45 -0
- data/lib/textpow/syntax/source.scheme.syntax +347 -0
- data/lib/textpow/syntax/source.scilab.syntax +41 -0
- data/lib/textpow/syntax/source.scss.syntax +527 -0
- data/lib/textpow/syntax/source.shell.syntax +384 -0
- data/lib/textpow/syntax/source.slate.syntax +149 -0
- data/lib/textpow/syntax/source.smarty.syntax +63 -0
- data/lib/textpow/syntax/source.sql.ruby.syntax +18 -0
- data/lib/textpow/syntax/source.sql.syntax +237 -0
- data/lib/textpow/syntax/source.ssh-config.syntax +33 -0
- data/lib/textpow/syntax/source.strings.syntax +39 -0
- data/lib/textpow/syntax/source.swig.syntax +57 -0
- data/lib/textpow/syntax/source.tcl.macports.syntax +163 -0
- data/lib/textpow/syntax/source.tcl.syntax +152 -0
- data/lib/textpow/syntax/source.yaml.syntax +160 -0
- data/lib/textpow/syntax/text.active4d-ini.syntax +50 -0
- data/lib/textpow/syntax/text.bbcode.syntax +287 -0
- data/lib/textpow/syntax/text.bibtex.syntax +151 -0
- data/lib/textpow/syntax/text.blog.html.syntax +41 -0
- data/lib/textpow/syntax/text.blog.markdown.syntax +42 -0
- data/lib/textpow/syntax/text.blog.syntax +27 -0
- data/lib/textpow/syntax/text.blog.textile.syntax +27 -0
- data/lib/textpow/syntax/text.gtdalt.syntax +143 -0
- data/lib/textpow/syntax/text.haml.syntax +88 -0
- data/lib/textpow/syntax/text.html.asp.net.syntax +424 -0
- data/lib/textpow/syntax/text.html.asp.syntax +27 -0
- data/lib/textpow/syntax/text.html.basic.syntax +362 -0
- data/lib/textpow/syntax/text.html.cfm.syntax +119 -0
- data/lib/textpow/syntax/text.html.django.syntax +36 -0
- data/lib/textpow/syntax/text.html.dokuwiki.syntax +204 -0
- data/lib/textpow/syntax/text.html.doxygen.syntax +43 -0
- data/lib/textpow/syntax/text.html.markdown.multimarkdown.syntax +39 -0
- data/lib/textpow/syntax/text.html.mason.syntax +119 -0
- data/lib/textpow/syntax/text.html.mediawiki.syntax +567 -0
- data/lib/textpow/syntax/text.html.mt.syntax +162 -0
- data/lib/textpow/syntax/text.html.ruby.syntax +40 -0
- data/lib/textpow/syntax/text.html.strict.active4d.syntax +311 -0
- data/lib/textpow/syntax/text.html.tcl.syntax +26 -0
- data/lib/textpow/syntax/text.html.textile.syntax +215 -0
- data/lib/textpow/syntax/text.html.tt.syntax +121 -0
- data/lib/textpow/syntax/text.html.twiki.syntax +241 -0
- data/lib/textpow/syntax/text.html.xhtml.1-strict.syntax +4027 -0
- data/lib/textpow/syntax/text.log.latex.syntax +50 -0
- data/lib/textpow/syntax/text.mail.markdown.syntax +118 -0
- data/lib/textpow/syntax/text.man.syntax +17 -0
- data/lib/textpow/syntax/text.moinmoin.syntax +189 -0
- data/lib/textpow/syntax/text.plain.gtd.syntax +22 -0
- data/lib/textpow/syntax/text.plain.release-notes.syntax +46 -0
- data/lib/textpow/syntax/text.plain.syntax +32 -0
- data/lib/textpow/syntax/text.plist.syntax +635 -0
- data/lib/textpow/syntax/text.pmwiki.syntax +113 -0
- data/lib/textpow/syntax/text.restructuredtext.syntax +250 -0
- data/lib/textpow/syntax/text.setext.syntax +147 -0
- data/lib/textpow/syntax/text.subversion-commit.syntax +36 -0
- data/lib/textpow/syntax/text.tabular.csv.syntax +68 -0
- data/lib/textpow/syntax/text.tabular.tsv.syntax +50 -0
- data/lib/textpow/syntax/text.tex.latex.beamer.syntax +41 -0
- data/lib/textpow/syntax/text.tex.latex.haskell.syntax +24 -0
- data/lib/textpow/syntax/text.tex.latex.memoir.syntax +64 -0
- data/lib/textpow/syntax/text.tex.latex.rd.syntax +91 -0
- data/lib/textpow/syntax/text.tex.latex.sweave.syntax +84 -0
- data/lib/textpow/syntax/text.tex.latex.syntax +566 -0
- data/lib/textpow/syntax/text.tex.math.syntax +49 -0
- data/lib/textpow/syntax/text.tex.syntax +86 -0
- data/lib/textpow/syntax/text.txt2tags.syntax +79 -0
- data/lib/textpow/syntax/text.xml.apple-dist.syntax +77 -0
- data/lib/textpow/syntax/text.xml.strict.syntax +92 -0
- data/lib/textpow/syntax/text.xml.syntax +180 -0
- data/lib/textpow/syntax/text.xml.xsl.syntax +60 -0
- data/lib/textpow/version.rb +3 -0
- data/spec/fixtures/objeck.plist +107 -0
- data/spec/fixtures/utf8.txt +1 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/textpow/score_manager_spec.rb +20 -0
- data/spec/textpow/syntax_files_spec.rb +26 -0
- data/spec/textpow/syntax_spec.rb +225 -0
- data/spec/textpow_spec.rb +57 -0
- data/textpow.gemspec +19 -0
- metadata +246 -68
- data/Manifest.txt +0 -13
- data/mm/manual.mm +0 -266
- data/test/test_textpow.rb +0 -25
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
name: mod_perl
|
3
|
+
fileTypes:
|
4
|
+
- conf
|
5
|
+
scopeName: source.apache-config.mod_perl
|
6
|
+
uuid: 6A616B03-1053-49BF-830F-0F4E63DB2447
|
7
|
+
foldingStartMarker: |-
|
8
|
+
^[ ]*(?x)
|
9
|
+
(<(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine|Perl)\b.*?>
|
10
|
+
)
|
11
|
+
patterns:
|
12
|
+
- name: comment.block.documentation.apache-config.mod_perl
|
13
|
+
captures:
|
14
|
+
"0":
|
15
|
+
name: punctuation.definition.comment.mod_perl
|
16
|
+
begin: ^=
|
17
|
+
end: ^=cut
|
18
|
+
- name: support.constant.apache-config.mod_perl
|
19
|
+
match: \b(PerlAddVar|PerlConfigRequire|PerlLoadModule|PerlModule|PerlOptions|PerlPassEnv|PerlPostConfigRequire|PerlRequire|PerlSetEnv|PerlSetVar|PerlSwitches|SetHandler|PerlOpenLogsHandler|PerlPostConfigHandler|PerlChildInitHandler|PerlChildExitHandler|PerlPreConnectionHandler|PerlProcessConnectionHandler|PerlInputFilterHandler|PerlOutputFilterHandler|PerlSetInputFilter|PerlSetOutputFilter|PerlPostReadRequestHandler|PerlTransHandler|PerlMapToStorageHandler|PerlInitHandler|PerlHeaderParserHandler|PerlAccessHandler|PerlAuthenHandler|PerlAuthzHandler|PerlTypeHandler|PerlFixupHandler|PerlResponseHandler|PerlLogHandler|PerlCleanupHandler|PerlInterpStart|PerlInterpMax|PerlInterpMinSpare|PerlInterpMaxSpare|PerlInterpMaxRequests|PerlInterpScope|PerlTrace)\b
|
20
|
+
- name: support.constant.apache-config.mod_perl_1.mod_perl
|
21
|
+
match: \b(PerlHandler|PerlScript|PerlSendHeader|PerlSetupEnv|PerlTaintCheck|PerlWarn|PerlFreshRestart)\b
|
22
|
+
- name: meta.perl-section.apache-config.mod_perl
|
23
|
+
endCaptures:
|
24
|
+
"1":
|
25
|
+
name: meta.tag.apache-config
|
26
|
+
"2":
|
27
|
+
name: punctuation.definition.tag.apache-config
|
28
|
+
"3":
|
29
|
+
name: entity.name.tag.apache-config
|
30
|
+
"4":
|
31
|
+
name: punctuation.definition.tag.apache-config
|
32
|
+
begin: ^\s*((<)(Perl)(>))
|
33
|
+
beginCaptures:
|
34
|
+
"1":
|
35
|
+
name: meta.tag.apache-config
|
36
|
+
"2":
|
37
|
+
name: punctuation.definition.tag.apache-config
|
38
|
+
"3":
|
39
|
+
name: entity.name.tag.apache-config
|
40
|
+
"4":
|
41
|
+
name: punctuation.definition.tag.apache-config
|
42
|
+
end: ^\s*((</)(Perl)(>))
|
43
|
+
patterns:
|
44
|
+
- include: source.perl
|
45
|
+
- include: source.apache-config
|
46
|
+
foldingStopMarker: |-
|
47
|
+
^[ ]*(?x)
|
48
|
+
(</(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine|Perl)>
|
49
|
+
)
|
50
|
+
keyEquivalent: ^~A
|
@@ -0,0 +1,191 @@
|
|
1
|
+
---
|
2
|
+
name: Apache
|
3
|
+
fileTypes:
|
4
|
+
- conf
|
5
|
+
- htaccess
|
6
|
+
scopeName: source.apache-config
|
7
|
+
repository:
|
8
|
+
vars:
|
9
|
+
patterns:
|
10
|
+
- name: support.variable.apache-config
|
11
|
+
captures:
|
12
|
+
"1":
|
13
|
+
name: punctuation.definition.variable.apache-config
|
14
|
+
"3":
|
15
|
+
name: punctuation.definition.variable.apache-config
|
16
|
+
match: (%\{)(?:HTTP_(?:USER_AGENT|REFERER|COOKIE|FORWARDED|HOST|PROXY_CONNECTION|ACCEPT)|REMOTE_(?:ADDR|HOST|USER|IDENT)|REQUEST_(?:METHOD|URI|FILENAME)|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_(?:ADMIN|NAME|ADDR|PORT|PROTOCOL|SOFTWARE)|TIME_(?:YEAR|MON|DAY|HOUR|MIN|SEC|WDAY)|TIME|API_VERSION|THE_REQUEST|IS_SUBREQ|(?:ENV|LA-U|LA-F|HTTP|SSL):[^\}]+)(\})
|
17
|
+
- name: invalid.illegal.bad-var.apache-config
|
18
|
+
match: "%\\{[^\\}]+\\}"
|
19
|
+
uuid: 023D670E-80F1-11D9-9BD1-00039398C572
|
20
|
+
foldingStartMarker: |-
|
21
|
+
^[ ]*(?x)
|
22
|
+
(<(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine)\b.*?>
|
23
|
+
)
|
24
|
+
patterns:
|
25
|
+
- name: comment.line.number-sign.apache-config
|
26
|
+
captures:
|
27
|
+
"1":
|
28
|
+
name: punctuation.definition.comment.apache-config
|
29
|
+
match: (#).*$\n?
|
30
|
+
- name: meta.tag.any.html
|
31
|
+
captures:
|
32
|
+
"6":
|
33
|
+
name: punctuation.definition.tag.apache-config
|
34
|
+
"1":
|
35
|
+
name: punctuation.definition.tag.apache-config
|
36
|
+
"2":
|
37
|
+
name: entity.name.tag.apache-config
|
38
|
+
"3":
|
39
|
+
name: punctuation.definition.tag.apache-config
|
40
|
+
"4":
|
41
|
+
name: meta.scope.between-tag-pair.apache-config
|
42
|
+
"5":
|
43
|
+
name: entity.name.tag.apache-config
|
44
|
+
match: ^[ ]*(<)([a-zA-Z0-9:]+)[^>]*(>(<)/)(\2)(>)
|
45
|
+
- name: meta.vhost.apache-config
|
46
|
+
endCaptures:
|
47
|
+
"1":
|
48
|
+
name: meta.tag.apache-config
|
49
|
+
"2":
|
50
|
+
name: punctuation.definition.tag.apache-config
|
51
|
+
"3":
|
52
|
+
name: entity.name.tag.apache-config
|
53
|
+
"4":
|
54
|
+
name: punctuation.definition.tag.apache-config
|
55
|
+
begin: ^[ ]*((<)(VirtualHost)(?:[ ]+([^>]+))?(>))
|
56
|
+
beginCaptures:
|
57
|
+
"1":
|
58
|
+
name: meta.tag.apache-config
|
59
|
+
"2":
|
60
|
+
name: punctuation.definition.tag.apache-config
|
61
|
+
"3":
|
62
|
+
name: entity.name.tag.apache-config
|
63
|
+
"4":
|
64
|
+
name: meta.toc-list.virtual-host.apache-config
|
65
|
+
"5":
|
66
|
+
name: punctuation.definition.tag.apache-config
|
67
|
+
end: ^[ ]*((</)(VirtualHost)[^>]*(>))
|
68
|
+
patterns:
|
69
|
+
- include: $base
|
70
|
+
- name: meta.directory.apache-config
|
71
|
+
endCaptures:
|
72
|
+
"1":
|
73
|
+
name: meta.tag.apache-config
|
74
|
+
"2":
|
75
|
+
name: punctuation.definition.tag.apache-config
|
76
|
+
"3":
|
77
|
+
name: entity.name.tag.apache-config
|
78
|
+
"4":
|
79
|
+
name: punctuation.definition.tag.apache-config
|
80
|
+
begin: ^[ ]*((<)(Directory(?:Match)?)(?:[ ]+([^>]+))?(>))
|
81
|
+
beginCaptures:
|
82
|
+
"1":
|
83
|
+
name: meta.tag.apache-config
|
84
|
+
"2":
|
85
|
+
name: punctuation.definition.tag.apache-config
|
86
|
+
"3":
|
87
|
+
name: entity.name.tag.apache-config
|
88
|
+
"4":
|
89
|
+
name: meta.toc-list.directory.apache-config
|
90
|
+
"5":
|
91
|
+
name: punctuation.definition.tag.apache-config
|
92
|
+
end: ^[ ]*((</)(Directory(?:Match)?)[^>]*(>))
|
93
|
+
patterns:
|
94
|
+
- include: $base
|
95
|
+
- name: meta.location.apache-config
|
96
|
+
endCaptures:
|
97
|
+
"1":
|
98
|
+
name: meta.tag.apache-config
|
99
|
+
"2":
|
100
|
+
name: punctuation.definition.tag.apache-config
|
101
|
+
"3":
|
102
|
+
name: entity.name.tag.apache-config
|
103
|
+
"4":
|
104
|
+
name: punctuation.definition.tag.apache-config
|
105
|
+
begin: ^[ ]*((<)(Location(?:Match)?)(?:[ ]+([^>]+))?(>))
|
106
|
+
beginCaptures:
|
107
|
+
"1":
|
108
|
+
name: meta.tag.apache-config
|
109
|
+
"2":
|
110
|
+
name: punctuation.definition.tag.apache-config
|
111
|
+
"3":
|
112
|
+
name: entity.name.tag.apache-config
|
113
|
+
"4":
|
114
|
+
name: meta.toc-list.location.apache-config
|
115
|
+
"5":
|
116
|
+
name: punctuation.definition.tag.apache-config
|
117
|
+
end: ^[ ]*((</)(Location(?:Match)?)[^>]*(>))
|
118
|
+
patterns:
|
119
|
+
- include: $base
|
120
|
+
- captures:
|
121
|
+
"1":
|
122
|
+
name: support.constant.rewritecond.apache-config
|
123
|
+
begin: ^[ ]*\b(RewriteCond)\b
|
124
|
+
end: $
|
125
|
+
patterns:
|
126
|
+
- begin: "[ ]+"
|
127
|
+
end: $
|
128
|
+
patterns:
|
129
|
+
- include: "#vars"
|
130
|
+
- name: string.regexp.rewrite-test.apache-config
|
131
|
+
match: "[^ %\\n]+"
|
132
|
+
- begin: "[ ]+"
|
133
|
+
end: $
|
134
|
+
patterns:
|
135
|
+
- name: string.other.rewrite-condition.apache-config
|
136
|
+
match: "[^ %\\n]+"
|
137
|
+
- captures:
|
138
|
+
"1":
|
139
|
+
name: string.regexp.rewrite-operator.apache-config
|
140
|
+
match: "[ ]+(\\[[^\\]]+\\])"
|
141
|
+
- captures:
|
142
|
+
"1":
|
143
|
+
name: support.constant.rewriterule.apache-config
|
144
|
+
begin: ^[ ]*\b(RewriteRule)\b
|
145
|
+
end: $
|
146
|
+
patterns:
|
147
|
+
- begin: "[ ]+"
|
148
|
+
end: $
|
149
|
+
patterns:
|
150
|
+
- include: "#vars"
|
151
|
+
- name: string.regexp.rewrite-pattern.apache-config
|
152
|
+
match: "[^ %]+"
|
153
|
+
- begin: "[ ]+"
|
154
|
+
end: $
|
155
|
+
patterns:
|
156
|
+
- include: "#vars"
|
157
|
+
- name: string.other.rewrite-substitution.apache-config
|
158
|
+
match: "[^ %\\n]+"
|
159
|
+
- captures:
|
160
|
+
"1":
|
161
|
+
name: string.regexp.rewrite-operator.apache-config
|
162
|
+
match: "[ ]+(\\[[^\\]]+\\])"
|
163
|
+
- name: support.constant.apache-config
|
164
|
+
match: \b(R(e(sourceConfig|direct(Match|Temp|Permanent)?|qu(ire|estHeader)|ferer(Ignore|Log)|write(Rule|Map|Base|Cond|Options|Engine|Lo(ck|g(Level)?))|admeName|move(Handler|Charset|Type|InputFilter|OutputFilter|Encoding|Language))|Limit(MEM|NPROC|CPU))|Group|XBitHack|M(MapFile|i(nSpare(Servers|Threads)|meMagicFile)|odMimeUsePathInfo|Cache(RemovalAlgorithm|M(inObjectSize|ax(StreamingBuffer|Object(Size|Count)))|Size)|ultiviewsMatch|eta(Suffix|Dir|Files)|ax(RequestsPer(Child|Thread)|MemFree|Spare(Servers|Threads)|Clients|Threads(PerChild)?|KeepAliveRequests))|B(indAddress|S2000Account|rowserMatch(NoCase)?)|S(hmemUIDisUser|c(oreBoardFile|ript(Sock|InterpreterSource|Log(Buffer|Length)?|Alias(Match)?)?)|tart(Servers|Threads)|S(I(StartTag|TimeFormat|UndefinedEcho|E(ndTag|rrorMsg))|L(R(equire(SSL)?|andomSeed)|Mutex|SessionCache(Timeout)?|C(ipherSuite|ertificate(ChainFile|KeyFile|File)|A(Revocation(Path|File)|Certificate(Path|File)))|Options|P(assPhraseDialog|ro(tocol|xy(MachineCertificate(Path|File)|C(ipherSuite|A(Revocation(Path|File)|Certificate(Path|File)))|Protocol|Engine|Verify(Depth)?)))|Engine|Verify(Client|Depth)))|uexecUserGroup|e(ndBufferSize|cureListen|t(Handler|InputFilter|OutputFilter|Env(If(NoCase)?)?)|rver(Root|Signature|Name|T(ype|okens)|Path|Limit|A(dmin|lias)))|atisfy)|H(ostnameLookups|eader(Name)?)|N(o(Cache|Proxy)|umServers|ameVirtualHost|WSSL(TrustedCerts|Upgradeable))|C(h(ildPerUserID|eckSpelling|arset(SourceEnc|Options|Default))|GI(MapExtension|CommandArgs)|o(ntentDigest|okie(Style|Name|Tracking|Domain|Prefix|Expires|Format|Log)|reDumpDirectory)|ustomLog|learModuleList|ache(Root|Gc(MemUsage|Clean|Interval|Daily|Unused)|M(inFileSize|ax(Expire|FileSize))|Size|NegotiatedDocs|TimeMargin|Ignore(NoLastMod|CacheControl)|D(i(sable|rLe(ngth|vels))|efaultExpire)|E(nable|xpiryCheck)|F(ile|orceCompletion)|LastModifiedFactor))|T(hread(sPerChild|StackSize|Limit)|ypesConfig|ime(out|Out)|ransferLog)|I(n(clude|dex(Ignore|O(ptions|rderDefault)))|SAPI(ReadAheadBuffer|CacheFile|FakeAsync|LogNotSupported|AppendLogTo(Errors|Query))|dentityCheck|f(Module|Define)|map(Menu|Base|Default))|O(ptions|rder)|D(irectory(Match|Slash|Index)?|ocumentRoot|e(ny|f(late(MemLevel|BufferSize|CompressionLevel|FilterNote|WindowSize)|ault(Type|Icon|Language)))|av(MinTimeout|DepthInfinity|LockDB)?)|U(se(CanonicalName|r(Dir)?)|nsetEnv)|P(idFile|ort|assEnv|ro(tocol(ReqCheck|Echo)|xy(Re(ceiveBufferSize|quests|mote(Match)?)|Ma(tch|xForwards)|B(lock|adHeader)|Timeout|IOBufferSize|Domain|P(ass(Reverse)?|reserveHost)|ErrorOverride|Via)?))|E(nable(MMAP|Sendfile|ExceptionHook)|BCDIC(Convert(ByType)?|Kludge)|rror(Header|Document|Log)|x(t(endedStatus|Filter(Options|Define))|pires(ByType|Default|Active)|ample))|Virtual(ScriptAlias(IP)?|Host|DocumentRoot(IP)?)|KeepAlive(Timeout)?|F(ile(s(Match)?|ETag)|or(ce(Type|LanguagePriority)|ensicLog)|ancyIndexing)|Win32DisableAcceptEx|L(i(sten(Back(log|Log))?|mit(Request(Body|Field(s(ize)?|Size)|Line)|XMLRequestBody|InternalRecursion|Except)?)|o(c(kFile|ation(Match)?)|ad(Module|File)|g(Format|Level))|DAP(SharedCache(Size|File)|Cache(TTL|Entries)|TrustedCA(Type)?|OpCache(TTL|Entries))|anguagePriority)|A(ssignUserID|nonymous(_(MustGiveEmail|NoUserID|VerifyEmail|LogEmail|Authoritative))?|c(ce(ss(Config|FileName)|pt(Mutex|PathInfo|Filter))|tion)|dd(Module(Info)?|Handler|Charset|Type|I(nputFilter|con(By(Type|Encoding))?)|OutputFilter(ByType)?|De(scription|faultCharset)|Encoding|Language|Alt(By(Type|Encoding))?)|uth(GroupFile|Name|Type|D(B(GroupFile|M(GroupFile|Type|UserFile|Authoritative)|UserFile|Authoritative)|igest(GroupFile|ShmemSize|N(cCheck|once(Format|Lifetime))|Domain|Qop|File|Algorithm))|UserFile|LDAP(RemoteUserIsDN|GroupAttribute(IsDN)?|Bind(DN|Password)|C(harsetConfig|ompareDNOnServer)|DereferenceAliases|Url|Enabled|FrontPageHack|Authoritative)|Authoritative)|l(ias(Match)?|low(CONNECT|Override|EncodedSlashes)?)|gentLog))\b
|
165
|
+
- name: support.class.apache-config
|
166
|
+
match: \b(access_module|action_module|alias_module|anon_auth_module|asis_module|auth_module|autoindex_module|cern_meta_module|cgi_module|config_log_module|dav_module|dbm_auth_module|digest_module|dir_module|env_module|expires_module|foo_module|headers_module|hfs_apple_module|imap_module|includes_module|info_module|jk_module|mime_magic_module|mime_module|negotiation_module|perl_module|php4_module|php5_module|proxy_module|rendezvous_apple_module|rendezvous_module|rewrite_module|setenvif_module|speling_module|ssl_module|status_module|unique_id_module|userdir_module|usertrack_module|vhost_alias_module)\b
|
167
|
+
- name: string.quoted.double.apache-config
|
168
|
+
endCaptures:
|
169
|
+
"0":
|
170
|
+
name: punctuation.definition.string.end.apache-config
|
171
|
+
begin: "\""
|
172
|
+
beginCaptures:
|
173
|
+
"0":
|
174
|
+
name: punctuation.definition.string.begin.apache-config
|
175
|
+
end: "\"(?!\")"
|
176
|
+
patterns:
|
177
|
+
- name: constant.character.escape.apostrophe.apache
|
178
|
+
match: "\"\""
|
179
|
+
- name: meta.tag.apache-config
|
180
|
+
captures:
|
181
|
+
"1":
|
182
|
+
name: punctuation.definition.tag.apache-config
|
183
|
+
"2":
|
184
|
+
name: entity.name.tag.apache-config
|
185
|
+
begin: (</?)([a-zA-Z]+)
|
186
|
+
end: (/?>)
|
187
|
+
foldingStopMarker: |-
|
188
|
+
^[ ]*(?x)
|
189
|
+
(</(?i:FilesMatch|Files|DirectoryMatch|Directory|LocationMatch|Location|VirtualHost|IfModule|IfDefine)>
|
190
|
+
)
|
191
|
+
keyEquivalent: ^~A
|
@@ -0,0 +1,384 @@
|
|
1
|
+
---
|
2
|
+
name: AppleScript
|
3
|
+
fileTypes:
|
4
|
+
- applescript
|
5
|
+
- script editor
|
6
|
+
scopeName: source.applescript
|
7
|
+
repository:
|
8
|
+
textmate:
|
9
|
+
patterns:
|
10
|
+
- name: support.class.textmate.applescript
|
11
|
+
match: \b(print settings)\b
|
12
|
+
- name: support.function.textmate.applescript
|
13
|
+
match: \b(get url|insert|reload bundles)\b
|
14
|
+
standard-suite:
|
15
|
+
patterns:
|
16
|
+
- name: support.class.standard-suite.applescript
|
17
|
+
match: \b(colors?|documents?|items?|windows?)\b
|
18
|
+
- name: support.function.standard-suite.applescript
|
19
|
+
match: \b(close|count|delete|duplicate|exists|make|move|open|print|quit|save|activate|select|data size)\b
|
20
|
+
- name: support.constant.standard-suite.applescript
|
21
|
+
match: \b(name|frontmost|version)\b
|
22
|
+
- name: support.variable.standard-suite.applescript
|
23
|
+
match: \b(selection)\b
|
24
|
+
- name: support.class.text-suite.applescript
|
25
|
+
match: \b(attachments?|attribute runs?|characters?|paragraphs?|texts?|words?)\b
|
26
|
+
tell-blocks:
|
27
|
+
patterns:
|
28
|
+
- name: meta.tell-block.application.textmate.applescript
|
29
|
+
captures:
|
30
|
+
"1":
|
31
|
+
name: keyword.control.applescript
|
32
|
+
begin: ^\s*(tell)\s+(?=app(lication)?\s+"(?i:textmate)")(?!.*\bto\b)
|
33
|
+
end: ^\s*(end tell)
|
34
|
+
patterns:
|
35
|
+
- include: "#textmate"
|
36
|
+
- include: "#standard-suite"
|
37
|
+
- include: $self
|
38
|
+
comment: tell Textmate
|
39
|
+
- name: meta.tell-block.application.finder.applescript
|
40
|
+
captures:
|
41
|
+
"1":
|
42
|
+
name: keyword.control.applescript
|
43
|
+
begin: ^\s*(tell)\s+(?=app(lication)?\s+"(?i:finder)")(?!.*\bto\b)
|
44
|
+
end: ^\s*(end tell)
|
45
|
+
patterns:
|
46
|
+
- include: "#finder"
|
47
|
+
- include: "#standard-suite"
|
48
|
+
- include: $self
|
49
|
+
comment: tell Finder
|
50
|
+
- name: meta.tell-block.application.system-events.applescript
|
51
|
+
captures:
|
52
|
+
"1":
|
53
|
+
name: keyword.control.applescript
|
54
|
+
begin: ^\s*(tell)\s+(?=app(lication)?\s+"(?i:system events)")(?!.*\bto\b)
|
55
|
+
end: ^\s*(end tell)
|
56
|
+
patterns:
|
57
|
+
- include: "#system-events"
|
58
|
+
- include: "#standard-suite"
|
59
|
+
- include: $self
|
60
|
+
comment: tell System Events
|
61
|
+
- name: meta.tell-block.application.itunes.applescript
|
62
|
+
captures:
|
63
|
+
"1":
|
64
|
+
name: keyword.control.applescript
|
65
|
+
begin: ^\s*(tell)\s+(?=app(lication)?\s+"(?i:itunes)")(?!.*\bto\b)
|
66
|
+
end: ^\s*(end tell)
|
67
|
+
patterns:
|
68
|
+
- include: "#itunes"
|
69
|
+
- include: "#standard-suite"
|
70
|
+
- include: $self
|
71
|
+
comment: tell iTunes
|
72
|
+
- name: meta.tell-block.application.generic.applescript
|
73
|
+
captures:
|
74
|
+
"1":
|
75
|
+
name: keyword.control.applescript
|
76
|
+
begin: ^\s*(tell)\s+(?=app(lication)?\b)(?!.*\bto\b)
|
77
|
+
end: ^\s*(end tell)
|
78
|
+
patterns:
|
79
|
+
- include: "#standard-suite"
|
80
|
+
- include: $self
|
81
|
+
comment: tell generic application
|
82
|
+
- name: meta.tell-block.generic.applescript
|
83
|
+
captures:
|
84
|
+
"1":
|
85
|
+
name: keyword.control.applescript
|
86
|
+
begin: ^\s*(tell)\s+(?!.*\bto\b)
|
87
|
+
end: ^\s*(end tell)
|
88
|
+
patterns:
|
89
|
+
- include: $self
|
90
|
+
comment: generic tell block
|
91
|
+
comments:
|
92
|
+
patterns:
|
93
|
+
- name: comment.line.double-dash.applescript
|
94
|
+
captures:
|
95
|
+
"1":
|
96
|
+
name: punctuation.definition.comment.applescript
|
97
|
+
match: (--).*$\n?
|
98
|
+
- name: comment.block.applescript
|
99
|
+
captures:
|
100
|
+
"0":
|
101
|
+
name: punctuation.definition.comment.applescript
|
102
|
+
begin: \(\*
|
103
|
+
end: \*\)
|
104
|
+
inline:
|
105
|
+
patterns:
|
106
|
+
- include: "#comments"
|
107
|
+
- include: "#data-structures"
|
108
|
+
- include: "#built-in"
|
109
|
+
- include: "#standardadditions"
|
110
|
+
data-structures:
|
111
|
+
patterns:
|
112
|
+
- name: meta.data.array.applescript
|
113
|
+
captures:
|
114
|
+
"1":
|
115
|
+
name: punctuation.section.array.applescript
|
116
|
+
begin: (\{)
|
117
|
+
end: (\})
|
118
|
+
patterns:
|
119
|
+
- captures:
|
120
|
+
"1":
|
121
|
+
name: constant.other.key.applescript
|
122
|
+
"2":
|
123
|
+
name: meta.identifier.applescript
|
124
|
+
"3":
|
125
|
+
name: punctuation.definition.identifier.applescript
|
126
|
+
"4":
|
127
|
+
name: punctuation.definition.identifier.applescript
|
128
|
+
"5":
|
129
|
+
name: punctuation.separator.key-value.applescript
|
130
|
+
match: ([A-Za-z]+|((\|)[^|\n]*(\|)))\s*(:)
|
131
|
+
- name: punctuation.separator.key-value.applescript
|
132
|
+
match: ":"
|
133
|
+
- name: punctuation.separator.array.applescript
|
134
|
+
match: ","
|
135
|
+
- include: "#inline"
|
136
|
+
comment: "\n\
|
137
|
+
\t\t\t\t\t\twe cannot necessarily distinguish \"records\" from\n\
|
138
|
+
\t\t\t\t\t\t\"arrays\", and so this could be either\n\
|
139
|
+
\t\t\t\t\t"
|
140
|
+
- name: string.quoted.double.application-name.applescript
|
141
|
+
captures:
|
142
|
+
"1":
|
143
|
+
name: punctuation.definition.string.applescript
|
144
|
+
begin: ((?<=application )"|(?<=app )")
|
145
|
+
end: (")
|
146
|
+
patterns:
|
147
|
+
- name: constant.character.escape.applescript
|
148
|
+
match: \\.
|
149
|
+
- name: string.quoted.double.applescript
|
150
|
+
captures:
|
151
|
+
"1":
|
152
|
+
name: punctuation.definition.string.applescript
|
153
|
+
begin: (")
|
154
|
+
end: (")
|
155
|
+
patterns:
|
156
|
+
- name: constant.character.escape.applescript
|
157
|
+
match: \\.
|
158
|
+
- name: meta.identifier.applescript
|
159
|
+
captures:
|
160
|
+
"1":
|
161
|
+
name: punctuation.definition.identifier.applescript
|
162
|
+
"2":
|
163
|
+
name: punctuation.definition.identifier.applescript
|
164
|
+
match: (\|)[^|\n]*(\|)
|
165
|
+
- name: meta.data.applescript
|
166
|
+
captures:
|
167
|
+
"6":
|
168
|
+
name: keyword.operator.applescript
|
169
|
+
"7":
|
170
|
+
name: support.class.built-in.applescript
|
171
|
+
"1":
|
172
|
+
name: punctuation.definition.data.applescript
|
173
|
+
"2":
|
174
|
+
name: support.class.built-in.applescript
|
175
|
+
"3":
|
176
|
+
name: storage.type.utxt.applescript
|
177
|
+
"4":
|
178
|
+
name: string.unquoted.data.applescript
|
179
|
+
"5":
|
180
|
+
name: punctuation.definition.data.applescript
|
181
|
+
match: "(\xC2\xAB)(data) (utxt|utf8)([0-9A-Fa-f]*)(\xC2\xBB)(?: (as) (Unicode text))?"
|
182
|
+
system-events:
|
183
|
+
patterns:
|
184
|
+
- name: support.class.system-events.audio-file.applescript
|
185
|
+
match: \b(audio (data|file))\b
|
186
|
+
- name: support.class.system-events.disk-folder-file.applescript
|
187
|
+
match: \b(alias(es)?|(Classic|local|network|system|user) domain objects?|disk( item)?s?|domains?|file( package)?s?|folders?|items?)\b
|
188
|
+
- name: support.function.system-events.disk-folder-file.applescript
|
189
|
+
match: \b(delete|open|move)\b
|
190
|
+
- name: support.class.system-events.folder-actions.applescript
|
191
|
+
match: \b(folder actions?|scripts?)\b
|
192
|
+
- name: support.function.system-events.folder-actions.applescript
|
193
|
+
match: \b(attach action to|attached scripts|edit action of|remove action from)\b
|
194
|
+
- name: support.class.system-events.movie-file.applescript
|
195
|
+
match: \b(movie data|movie file)\b
|
196
|
+
- name: support.function.system-events.power.applescript
|
197
|
+
match: \b(log out|restart|shut down|sleep)\b
|
198
|
+
- name: support.class.system-events.processes.applescript
|
199
|
+
match: \b(((application |desk accessory )?process|(check|combo )?box)(es)?|(action|attribute|browser|(busy|progress|relevance) indicator|color well|column|drawer|group|grow area|image|incrementor|list|menu( bar)?( item)?|(menu |pop up |radio )?button|outline|(radio|tab|splitter) group|row|scroll (area|bar)|sheet|slider|splitter|static text|table|text (area|field)|tool bar|UI element|window)s?)\b
|
200
|
+
- name: support.function.system-events.processes.applescript
|
201
|
+
match: \b(click|key code|keystroke|perform|select)\b
|
202
|
+
- name: support.class.system-events.property-list.applescript
|
203
|
+
match: \b(property list (file|item))\b
|
204
|
+
- name: support.class.system-events.quicktime-file.applescript
|
205
|
+
match: \b(annotation|QuickTime (data|file)|track)s?\b
|
206
|
+
- name: support.function.system-events.system-events.applescript
|
207
|
+
match: \b((abort|begin|end) transaction)\b
|
208
|
+
- name: support.class.system-events.xml.applescript
|
209
|
+
match: \b(XML (attribute|data|element|file)s?)\b
|
210
|
+
- name: support.class.sytem-events.other.applescript
|
211
|
+
match: \b(print settings|users?|login items?)\b
|
212
|
+
itunes:
|
213
|
+
patterns:
|
214
|
+
- name: support.class.itunes.applescript
|
215
|
+
match: \b(artwork|application|encoder|EQ preset|item|source|visual|(EQ |browser )?window|((audio CD|device|shared|URL|file) )?track|playlist window|((audio CD|device|radio tuner|library|folder|user) )?playlist)s?\b
|
216
|
+
- name: support.function.itunes.applescript
|
217
|
+
match: \b(add|back track|convert|fast forward|(next|previous) track|pause|play(pause)?|refresh|resume|rewind|search|stop|update|eject|subscribe|update(Podcast|AllPodcasts)|download)\b
|
218
|
+
- name: support.constant.itunes.applescript
|
219
|
+
match: \b(current (playlist|stream (title|URL)|track)|player state)\b
|
220
|
+
- name: support.variable.itunes.applescript
|
221
|
+
match: \b(current (encoder|EQ preset|visual)|EQ enabled|fixed indexing|full screen|mute|player position|sound volume|visuals enabled|visual size)\b
|
222
|
+
standardadditions:
|
223
|
+
patterns:
|
224
|
+
- name: support.class.standardadditions.user-interaction.applescript
|
225
|
+
match: \b((alert|dialog) reply)\b
|
226
|
+
- name: support.class.standardadditions.file.applescript
|
227
|
+
match: \b(file information)\b
|
228
|
+
- name: support.class.standardadditions.miscellaneous.applescript
|
229
|
+
match: \b(POSIX files?|system information|volume settings)\b
|
230
|
+
- name: support.class.standardadditions.internet.applescript
|
231
|
+
match: \b(URLs?|internet address(es)?|web pages?|FTP items?)\b
|
232
|
+
- name: support.function.standardadditions.file.applescript
|
233
|
+
match: \b(info for|list (disks|folder)|mount volume|path to( resource)?)\b
|
234
|
+
- name: support.function.standardadditions.user-interaction.applescript
|
235
|
+
match: \b(beep|choose (application|color|file( name)?|folder|from list|remote application|URL)|delay|display (alert|dialog)|say)\b
|
236
|
+
- name: support.function.standardadditions.string.applescript
|
237
|
+
match: \b(ASCII (character|number)|localized string|offset|summarize)\b
|
238
|
+
- name: support.function.standardadditions.clipboard.applescript
|
239
|
+
match: \b(set the clipboard to|the clipboard|clipboard info)\b
|
240
|
+
- name: support.function.standardadditions.file-i-o.applescript
|
241
|
+
match: \b(open for access|close access|read|write|get eof|set eof)\b
|
242
|
+
- name: support.function.standardadditions.scripting.applescript
|
243
|
+
match: \b((load|store|run) script|scripting components)\b
|
244
|
+
- name: support.function.standardadditions.miscellaneous.applescript
|
245
|
+
match: \b(current date|do shell script|get volume settings|random number|round|set volume|system attribute|system info|time to GMT)\b
|
246
|
+
- name: support.function.standardadditions.folder-actions.applescript
|
247
|
+
match: \b(opening folder|(closing|moving) folder window for|adding folder items to|removing folder items from)\b
|
248
|
+
- name: support.function.standardadditions.internet.applescript
|
249
|
+
match: \b(open location|handle CGI request)\b
|
250
|
+
built-in:
|
251
|
+
patterns:
|
252
|
+
- name: punctuation.separator.continuation.line.applescript
|
253
|
+
match: !binary |
|
254
|
+
wqw=
|
255
|
+
|
256
|
+
- name: keyword.operator.applescript
|
257
|
+
match: "\\b((a )?(ref( to)|reference to)|(does not|doesn't) (come (before|after)|contain|equal)|(start|begin)s? with|comes (before|after)|is(n't| not)?( (in|contained by|(less than|greater than)( or equal( to)?)?|equal( to)?))?|ends? with|contains?|equals?|than|and|div|mod|not|or|as)\\b|(\xE2\x89\xA0|\xE2\x89\xA5|\xE2\x89\xA4|>=|<=|\xC3\xB7|&|=|>|<|\\*|\\+|-|/|\\^)"
|
258
|
+
- captures:
|
259
|
+
"1":
|
260
|
+
name: keyword.control.applescript
|
261
|
+
match: (?<=^|then|to)\s*\b(return|prop(erty)?)\b
|
262
|
+
comment: make sure that "return", "property", and other keywords are not preceded by something else, to disambiguate
|
263
|
+
- name: punctuation.separator.key-value.property.applescript
|
264
|
+
match: ":"
|
265
|
+
comment: "the : in property assignments"
|
266
|
+
- name: punctuation.section.group.applescript
|
267
|
+
match: "[()]"
|
268
|
+
comment: the parentheses in groups
|
269
|
+
- name: keyword.control.applescript
|
270
|
+
match: \b(on error|try|to|on|tell|if|then|else if|else|repeat( (while|until|with))?|using terms from|from|through|thru|with timeout|times|end (tell|repeat|if|timeout|using terms from|error|try)|end|my|where|whose|considering|ignoring|global|local|exit|continue|returning|set|copy|put)\b
|
271
|
+
- name: keyword.control.reference.applescript
|
272
|
+
match: \b(every|some|index|named|from|to|through|thru|before|(in )?front of|after receiving|after|(in )?back of|beginning of|end of|in|of|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|\d+(st|nd|rd|th)|last|front|back|middle)\b
|
273
|
+
- name: constant.other.text-styles.applescript
|
274
|
+
match: \b(all (caps|lowercase)|bold|condensed|expanded|hidden|italic|outline|plain|shadow|small caps|strikethrough|(sub|super)script|underline)\b
|
275
|
+
- name: constant.language.boolean.applescript
|
276
|
+
match: \b(?i:true|false|yes|no)\b
|
277
|
+
comment: "yes/no can\xE2\x80\x99t always be used as booleans, e.g. in an if() expression. But they work e.g. for boolean arguments."
|
278
|
+
- name: constant.language.null.applescript
|
279
|
+
match: \b(null)\b
|
280
|
+
- name: constant.other.date-time.applescript
|
281
|
+
match: \b(Jan(uary)?|Feb(ruary)?|Mar(ch)?|Apr(il)?|May|Jun(e)?|Jul(y)?|Aug(ust)?|Sep(tember)?|Oct(ober)?|Nov(ember)?|Dec(ember)?|weekdays?|Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b
|
282
|
+
- name: constant.other.considering-ignoring-attributes.applescript
|
283
|
+
match: \b(?<=considering|ignoring) (application responses|current application|case|diacriticals|expansion|hyphens|punctuation|white space)\b
|
284
|
+
comment: these are used in considering/ignoring statements
|
285
|
+
- name: constant.other.characters.applescript
|
286
|
+
match: \b(space|return|tab)\b
|
287
|
+
- name: constant.other.miscellaneous.applescript
|
288
|
+
match: \b(current application|it|me|version|result|pi|AppleScript)\b
|
289
|
+
- name: variable.language.applescript
|
290
|
+
match: \b(text item delimiters|print length|print depth)\b
|
291
|
+
- name: support.function.built-in.applescript
|
292
|
+
match: \b(count (each|every)|number of|error|get|run)\b
|
293
|
+
- name: support.class.built-in.applescript
|
294
|
+
match: \b(booleans?|integers?|reals?|numbers?|(linked )?lists?|vectors?|records?|items?|scripts?|events?|propert(y|ies)|constants?|prepositions?|reference forms?|handlers?|data|characters?|writing code( infos?)?|missing values?|references?|anything|missing value|upper case|app(lications?)?|text items?|((international|styled( Clipboard|Unicode)?|Unicode) )?text|(C | encoded| Pascal )?strings?|(type )?class(es)?|RGB colors?|pictures?|sounds?|versions?|file specifications?|alias(es)?|machines?|zones?|keystrokes?|seconds|dates?|months?|(cubic |square |cubic centi|square kilo|centi|kilo)met(er|re)s|(square |cubic )?(yards|feet)|(square )?miles|(cubic )?inches|lit(re|er)s|gallons|quarts|(kilo)?grams|ounces|pounds|degrees (Celsius|Fahrenheit|Kelvin))\b
|
295
|
+
- name: constant.numeric.applescript
|
296
|
+
match: \b\d+((\.(\d+\b)?)?(?i:e\+?\d*\b)?|\b)
|
297
|
+
finder:
|
298
|
+
patterns:
|
299
|
+
- name: support.class.finder.items.applescript
|
300
|
+
match: \b(item|container|(computer|disk|trash)-object|disk|folder|((alias|application|document|internet location) )?file|clipping|package)s?\b
|
301
|
+
- name: support.class.finder.window-classes.applescript
|
302
|
+
match: \b((Finder|desktop|information|preferences|clipping) )windows?\b
|
303
|
+
- name: support.class.finder.type-definitions.applescript
|
304
|
+
match: \b(preferences|(icon|column|list) view options|(label|column|alias list)s?)\b
|
305
|
+
- name: support.function.finder.items.applescript
|
306
|
+
match: \b(copy|find|sort|clean up|eject|empty( trash)|erase|reveal|update)\b
|
307
|
+
- name: support.constant.finder.applescript
|
308
|
+
match: \b(insertion location|product version|startup disk|desktop|trash|home|computer container|finder preferences)\b
|
309
|
+
- name: support.variable.finder.applescript
|
310
|
+
match: \b(visible)\b
|
311
|
+
blocks:
|
312
|
+
patterns:
|
313
|
+
- name: meta.script.applescript
|
314
|
+
captures:
|
315
|
+
"1":
|
316
|
+
name: keyword.control.script.applescript
|
317
|
+
"2":
|
318
|
+
name: entity.name.type.script-object.applescript
|
319
|
+
begin: ^\s*(script)\s+(\w+)
|
320
|
+
end: ^\s*(end script)
|
321
|
+
patterns:
|
322
|
+
- include: $self
|
323
|
+
- name: meta.function.with-parentheses.applescript
|
324
|
+
captures:
|
325
|
+
"1":
|
326
|
+
name: keyword.control.on.applescript
|
327
|
+
"2":
|
328
|
+
name: entity.name.function.handler.applescript
|
329
|
+
"3":
|
330
|
+
name: punctuation.definition.parameters.applescript
|
331
|
+
"4":
|
332
|
+
name: variable.parameter.handler.applescript
|
333
|
+
"5":
|
334
|
+
name: punctuation.definition.parameters.applescript
|
335
|
+
begin: "^(?x)\n\
|
336
|
+
\t\t\t\t\t\t\\s*(to|on)\\s+ \t\t\t\t\t# \"on\" or \"to\"\n\
|
337
|
+
\t\t\t\t\t\t([A-Za-z][A-Za-z0-9_]*)\t\t\t# function name\n\
|
338
|
+
\t\t\t\t\t\t(\\()\t\t\t\t\t\t\t# opening paren\n\
|
339
|
+
\t\t\t\t\t\t\t(?:(\\w+(?:\\s*,\\s*\\w+)*))?\t# parameters\n\
|
340
|
+
\t\t\t\t\t\t(\\))\t\t\t\t\t\t\t# closing paren\n\
|
341
|
+
\t\t\t\t\t"
|
342
|
+
end: "^\\s*(end)(?: (\\2))?\\s*$"
|
343
|
+
patterns:
|
344
|
+
- include: $self
|
345
|
+
comment: "\n\
|
346
|
+
\t\t\t\t\t\tThis is not a very well-designed rule. For now,\n\
|
347
|
+
\t\t\t\t\t\twe can leave it like this though, as it sorta works.\n\
|
348
|
+
\t\t\t\t\t"
|
349
|
+
- name: meta.function.prepositional.applescript
|
350
|
+
captures:
|
351
|
+
"1":
|
352
|
+
name: keyword.control.on.applescript
|
353
|
+
"2":
|
354
|
+
name: entity.name.function.handler.applescript
|
355
|
+
begin: ^\s*(on)\s+(\w+)(?=\s+(above|against|apart from|around|aside from|at|below|beneath|beside|between|by|for|from|instead of|into|on|onto|out of|over|thru|under)\s+)
|
356
|
+
end: "^\\s*(end)(?: (\\2))?\\s*$"
|
357
|
+
patterns:
|
358
|
+
- captures:
|
359
|
+
"1":
|
360
|
+
name: keyword.control.preposition.applescript
|
361
|
+
"2":
|
362
|
+
name: variable.parameter.handler.applescript
|
363
|
+
match: \b(above|against|apart from|around|aside from|at|below|beneath|beside|between|by|for|from|instead of|into|on|onto|out of|over|thru|under)\s+(\w+)\b
|
364
|
+
- include: $self
|
365
|
+
- include: "#tell-blocks"
|
366
|
+
uuid: 777CF925-14B9-428E-B07B-17FAAB8FA27E
|
367
|
+
foldingStartMarker: "(?x)\n\
|
368
|
+
\t\t^\\s*\n\
|
369
|
+
\t\t(tell \\s+ (?! .* \\bto\\b) .*\n\
|
370
|
+
\t\t|using \\s+ terms \\s+ from \\s+ .*\n\
|
371
|
+
\t\t|if\\b .* \\bthen\\b .*\n\
|
372
|
+
\t\t|repeat\\b .*\n\
|
373
|
+
\t\t|( on | to )\\b (?!\\s+ error) .*\n\
|
374
|
+
\t\t|try\n\
|
375
|
+
\t\t|with \\s+ timeout .*\n\
|
376
|
+
\t\t|script\\b .*\n\
|
377
|
+
\t\t|( considering | ignoring )\\b .*\n\
|
378
|
+
\t\t)\\s*$\n\
|
379
|
+
\t"
|
380
|
+
patterns:
|
381
|
+
- include: "#blocks"
|
382
|
+
- include: "#inline"
|
383
|
+
foldingStopMarker: ^\s*end\b.*$
|
384
|
+
keyEquivalent: ^~A
|