tm-grammars 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/NOTICE +6565 -0
- package/README.md +211 -0
- package/grammars/abap.json +380 -0
- package/grammars/actionscript-3.json +951 -0
- package/grammars/ada.json +3874 -0
- package/grammars/apache.json +562 -0
- package/grammars/apex.json +3203 -0
- package/grammars/apl.json +1479 -0
- package/grammars/applescript.json +1406 -0
- package/grammars/ara.json +428 -0
- package/grammars/asm.json +1741 -0
- package/grammars/astro.json +776 -0
- package/grammars/awk.json +388 -0
- package/grammars/ballerina.json +3768 -0
- package/grammars/bat.json +783 -0
- package/grammars/beancount.json +831 -0
- package/grammars/berry.json +172 -0
- package/grammars/bibtex.json +315 -0
- package/grammars/bicep.json +239 -0
- package/grammars/blade.json +3870 -0
- package/grammars/c.json +3552 -0
- package/grammars/cadence.json +738 -0
- package/grammars/clarity.json +877 -0
- package/grammars/clojure.json +426 -0
- package/grammars/cmake.json +143 -0
- package/grammars/cobol.json +1124 -0
- package/grammars/codeql.json +1540 -0
- package/grammars/coffee.json +1311 -0
- package/grammars/cpp-macro.json +9498 -0
- package/grammars/cpp.json +16635 -0
- package/grammars/crystal.json +1866 -0
- package/grammars/csharp.json +5722 -0
- package/grammars/css.json +1860 -0
- package/grammars/csv.json +46 -0
- package/grammars/cue.json +1128 -0
- package/grammars/cypher.json +353 -0
- package/grammars/d.json +3185 -0
- package/grammars/dart.json +522 -0
- package/grammars/dax.json +185 -0
- package/grammars/diff.json +155 -0
- package/grammars/docker.json +97 -0
- package/grammars/dream-maker.json +640 -0
- package/grammars/elixir.json +1014 -0
- package/grammars/elm.json +751 -0
- package/grammars/erb.json +156 -0
- package/grammars/erlang.json +1757 -0
- package/grammars/fish.json +189 -0
- package/grammars/fsharp.json +1831 -0
- package/grammars/gdresource.json +290 -0
- package/grammars/gdscript.json +969 -0
- package/grammars/gdshader.json +405 -0
- package/grammars/gherkin.json +133 -0
- package/grammars/git-commit.json +85 -0
- package/grammars/git-rebase.json +56 -0
- package/grammars/glimmer-js.json +98 -0
- package/grammars/glimmer-ts.json +98 -0
- package/grammars/glsl.json +57 -0
- package/grammars/gnuplot.json +892 -0
- package/grammars/go.json +1012 -0
- package/grammars/graphql.json +1295 -0
- package/grammars/groovy.json +1378 -0
- package/grammars/hack.json +2650 -0
- package/grammars/haml.json +598 -0
- package/grammars/handlebars.json +848 -0
- package/grammars/haskell.json +2431 -0
- package/grammars/hcl.json +787 -0
- package/grammars/hjson.json +821 -0
- package/grammars/hlsl.json +212 -0
- package/grammars/html.json +93 -0
- package/grammars/imba.json +2696 -0
- package/grammars/ini.json +108 -0
- package/grammars/java.json +1885 -0
- package/grammars/javascript.json +5984 -0
- package/grammars/jinja-html.json +16 -0
- package/grammars/jinja.json +345 -0
- package/grammars/jison.json +715 -0
- package/grammars/jsdoc.json +21 -0
- package/grammars/json.json +208 -0
- package/grammars/json5.json +244 -0
- package/grammars/jsonc.json +208 -0
- package/grammars/jsonl.json +208 -0
- package/grammars/jsonnet.json +211 -0
- package/grammars/jssm.json +159 -0
- package/grammars/jsx.json +5984 -0
- package/grammars/julia.json +1061 -0
- package/grammars/kotlin.json +580 -0
- package/grammars/kusto.json +687 -0
- package/grammars/latex.json +2395 -0
- package/grammars/less.json +5012 -0
- package/grammars/liquid.json +990 -0
- package/grammars/lisp.json +121 -0
- package/grammars/logo.json +55 -0
- package/grammars/lua.json +956 -0
- package/grammars/make.json +629 -0
- package/grammars/markdown.json +3066 -0
- package/grammars/marko.json +1344 -0
- package/grammars/matlab.json +1131 -0
- package/grammars/mdc.json +571 -0
- package/grammars/mdx.json +5629 -0
- package/grammars/mermaid.json +1382 -0
- package/grammars/mojo.json +4153 -0
- package/grammars/narrat.json +227 -0
- package/grammars/nextflow.json +298 -0
- package/grammars/nginx.json +2121 -0
- package/grammars/nim.json +1522 -0
- package/grammars/nix.json +1200 -0
- package/grammars/nushell.json +1047 -0
- package/grammars/objective-c.json +3750 -0
- package/grammars/objective-cpp.json +7242 -0
- package/grammars/ocaml.json +2967 -0
- package/grammars/pascal.json +154 -0
- package/grammars/perl.json +2971 -0
- package/grammars/php.json +4024 -0
- package/grammars/plsql.json +241 -0
- package/grammars/postcss.json +377 -0
- package/grammars/powerquery.json +349 -0
- package/grammars/powershell.json +1024 -0
- package/grammars/prisma.json +443 -0
- package/grammars/prolog.json +298 -0
- package/grammars/proto.json +507 -0
- package/grammars/pug.json +1033 -0
- package/grammars/puppet.json +777 -0
- package/grammars/purescript.json +871 -0
- package/grammars/python.json +4208 -0
- package/grammars/r.json +637 -0
- package/grammars/raku.json +310 -0
- package/grammars/razor.json +1813 -0
- package/grammars/reg.json +136 -0
- package/grammars/rel.json +200 -0
- package/grammars/riscv.json +298 -0
- package/grammars/rst.json +734 -0
- package/grammars/ruby.json +2769 -0
- package/grammars/rust.json +1171 -0
- package/grammars/sas.json +302 -0
- package/grammars/sass.json +618 -0
- package/grammars/scala.json +1313 -0
- package/grammars/scheme.json +384 -0
- package/grammars/scss.json +1874 -0
- package/grammars/shaderlab.json +199 -0
- package/grammars/shellscript.json +2025 -0
- package/grammars/shellsession.json +33 -0
- package/grammars/smalltalk.json +235 -0
- package/grammars/solidity.json +1210 -0
- package/grammars/sparql.json +45 -0
- package/grammars/splunk.json +91 -0
- package/grammars/sql.json +631 -0
- package/grammars/ssh-config.json +88 -0
- package/grammars/stata.json +3050 -0
- package/grammars/stylus.json +1208 -0
- package/grammars/svelte.json +1171 -0
- package/grammars/swift.json +4203 -0
- package/grammars/system-verilog.json +1063 -0
- package/grammars/tasl.json +292 -0
- package/grammars/tcl.json +291 -0
- package/grammars/tex.json +281 -0
- package/grammars/toml.json +431 -0
- package/grammars/tsx.json +5984 -0
- package/grammars/turtle.json +261 -0
- package/grammars/twig.json +1394 -0
- package/grammars/typescript.json +5735 -0
- package/grammars/v.json +1001 -0
- package/grammars/vb.json +232 -0
- package/grammars/verilog.json +305 -0
- package/grammars/vhdl.json +1484 -0
- package/grammars/viml.json +445 -0
- package/grammars/vue-html.json +559 -0
- package/grammars/vue.json +1237 -0
- package/grammars/vyper.json +5415 -0
- package/grammars/wasm.json +831 -0
- package/grammars/wenyan.json +129 -0
- package/grammars/wgsl.json +391 -0
- package/grammars/wolfram.json +2370 -0
- package/grammars/xml.json +382 -0
- package/grammars/xsl.json +89 -0
- package/grammars/yaml.json +616 -0
- package/grammars/zenscript.json +257 -0
- package/grammars/zig.json +312 -0
- package/index.d.ts +18 -0
- package/index.js +2165 -0
- package/package.json +46 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Scheme",
|
|
3
|
+
"fileTypes": [
|
|
4
|
+
"scm",
|
|
5
|
+
"ss",
|
|
6
|
+
"sch",
|
|
7
|
+
"rkt"
|
|
8
|
+
],
|
|
9
|
+
"name": "scheme",
|
|
10
|
+
"patterns": [
|
|
11
|
+
{
|
|
12
|
+
"include": "#comment"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"include": "#block-comment"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"include": "#sexp"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"include": "#string"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"include": "#language-functions"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"include": "#quote"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"include": "#illegal"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"repository": {
|
|
34
|
+
"block-comment": {
|
|
35
|
+
"begin": "\\#\\|",
|
|
36
|
+
"contentName": "comment",
|
|
37
|
+
"end": "\\|\\#",
|
|
38
|
+
"name": "comment",
|
|
39
|
+
"patterns": [
|
|
40
|
+
{
|
|
41
|
+
"include": "#block-comment",
|
|
42
|
+
"name": "comment"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"comment": {
|
|
47
|
+
"begin": "(^[ \\t]+)?(?=;)",
|
|
48
|
+
"beginCaptures": {
|
|
49
|
+
"1": {
|
|
50
|
+
"name": "punctuation.whitespace.comment.leading.scheme"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"end": "(?!\\G)",
|
|
54
|
+
"patterns": [
|
|
55
|
+
{
|
|
56
|
+
"begin": ";",
|
|
57
|
+
"beginCaptures": {
|
|
58
|
+
"0": {
|
|
59
|
+
"name": "punctuation.definition.comment.scheme"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"end": "\\n",
|
|
63
|
+
"name": "comment.line.semicolon.scheme"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"constants": {
|
|
68
|
+
"patterns": [
|
|
69
|
+
{
|
|
70
|
+
"match": "#[t|f]",
|
|
71
|
+
"name": "constant.language.boolean.scheme"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"match": "(?<=[\\(\\s])((#e|#i)?[0-9]+(\\.[0-9]+)?|(#x)[0-9a-fA-F]+|(#o)[0-7]+|(#b)[01]+)(?=[\\s;()'\",\\[\\]])",
|
|
75
|
+
"name": "constant.numeric.scheme"
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"illegal": {
|
|
80
|
+
"match": "[()\\[\\]]",
|
|
81
|
+
"name": "invalid.illegal.parenthesis.scheme"
|
|
82
|
+
},
|
|
83
|
+
"language-functions": {
|
|
84
|
+
"patterns": [
|
|
85
|
+
{
|
|
86
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\(|\\[)) # preceded by space or ( \n\t\t\t\t\t\t( do|or|and|else|quasiquote|begin|if|case|set!|\n\t\t\t\t\t\t cond|let|unquote|define|let\\*|unquote-splicing|delay|\n\t\t\t\t\t\t letrec)\n\t\t\t\t\t\t(?=(\\s|\\())",
|
|
87
|
+
"name": "keyword.control.scheme"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"comment": "\n\t\t\t\t\t\tThese functions run a test, and return a boolean\n\t\t\t\t\t\tanswer.\n\t\t\t\t\t",
|
|
91
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char-alphabetic|char-lower-case|char-numeric|\n\t\t\t\t\t\t char-ready|char-upper-case|char-whitespace|\n\t\t\t\t\t\t (?:char|string)(?:-ci)?(?:=|<=?|>=?)|\n\t\t\t\t\t\t atom|boolean|bound-identifier=|char|complex|\n\t\t\t\t\t\t identifier|integer|symbol|free-identifier=|inexact|\n\t\t\t\t\t\t eof-object|exact|list|(?:input|output)-port|pair|\n\t\t\t\t\t\t real|rational|zero|vector|negative|odd|null|string|\n\t\t\t\t\t\t eq|equal|eqv|even|number|positive|procedure\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(\\?)\t\t# name ends with ? sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t",
|
|
92
|
+
"name": "support.function.boolean-test.scheme"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"comment": "\n\t\t\t\t\t\tThese functions change one type into another.\n\t\t\t\t\t",
|
|
96
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( char->integer|exact->inexact|inexact->exact|\n\t\t\t\t\t\t integer->char|symbol->string|list->vector|\n\t\t\t\t\t\t list->string|identifier->symbol|vector->list|\n\t\t\t\t\t\t string->list|string->number|string->symbol|\n\t\t\t\t\t\t number->string\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\t\t\t\t\t\n\t\t\t\t\t",
|
|
97
|
+
"name": "support.function.convert-type.scheme"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"comment": "\n\t\t\t\t\t\tThese functions are potentially dangerous because\n\t\t\t\t\t\tthey have side-effects which could affect other\n\t\t\t\t\t\tparts of the program.\n\t\t\t\t\t",
|
|
101
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( set-(?:car|cdr)|\t\t\t\t # set car/cdr\n\t\t\t\t\t\t (?:vector|string)-(?:fill|set) # fill/set string/vector\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(!)\t\t\t# name ends with ! sign\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t",
|
|
102
|
+
"name": "support.function.with-side-effects.scheme"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"comment": "\n\t\t\t\t\t\t+, -, *, /, =, >, etc. \n\t\t\t\t\t",
|
|
106
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( >=?|<=?|=|[*/+-])\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t\t",
|
|
107
|
+
"name": "keyword.operator.arithmetic.scheme"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"match": "(?x)\n\t\t\t\t\t\t(?<=(\\s|\\()) # preceded by space or (\n\t\t\t\t\t\t( append|apply|approximate|\n\t\t\t\t\t\t call-with-current-continuation|call/cc|catch|\n\t\t\t\t\t\t construct-identifier|define-syntax|display|foo|\n\t\t\t\t\t\t for-each|force|format|cd|gen-counter|gen-loser|\n\t\t\t\t\t\t generate-identifier|last-pair|length|let-syntax|\n\t\t\t\t\t\t letrec-syntax|list|list-ref|list-tail|load|log|\n\t\t\t\t\t\t macro|magnitude|map|map-streams|max|member|memq|\n\t\t\t\t\t\t memv|min|newline|nil|not|peek-char|rationalize|\n\t\t\t\t\t\t read|read-char|return|reverse|sequence|substring|\n\t\t\t\t\t\t syntax|syntax-rules|transcript-off|transcript-on|\n\t\t\t\t\t\t truncate|unwrap-syntax|values-list|write|write-char|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # cons, car, cdr, etc\n\t\t\t\t\t\t cons|c(a|d){1,4}r| \n \n\t\t\t\t\t\t # unary math operators\n\t\t\t\t\t\t abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|\n\t\t\t\t\t\t cos|floor|round|sin|sqrt|tan|\n\t\t\t\t\t\t (?:real|imag)-part|numerator|denominator\n \n\t\t\t\t\t\t # other math operators\n\t\t\t\t\t\t modulo|exp|expt|remainder|quotient|lcm|\n \n\t\t\t\t\t\t # ports / files\n\t\t\t\t\t\t call-with-(?:input|output)-file|\n\t\t\t\t\t\t (?:close|current)-(?:input|output)-port|\n\t\t\t\t\t\t with-(?:input|output)-from-file|\n\t\t\t\t\t\t open-(?:input|output)-file|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # char-«foo»\n\t\t\t\t\t\t char-(?:downcase|upcase|ready)|\n\t\t\t\t\t\t \n\t\t\t\t\t\t # make-«foo»\n\t\t\t\t\t\t make-(?:polar|promise|rectangular|string|vector)\n\t\t\t\t\t\t \n\t\t\t\t\t\t # string-«foo», vector-«foo»\n\t\t\t\t\t\t string(?:-(?:append|copy|length|ref))?|\n\t\t\t\t\t\t vector(?:-length|-ref)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t(?=(\\s|\\()) # followed by space or (\n\t\t\t\t\t",
|
|
111
|
+
"name": "support.function.general.scheme"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"quote": {
|
|
116
|
+
"comment": "\n\t\t\t\tWe need to be able to quote any kind of item, which creates\n\t\t\t\ta tiny bit of complexity in our grammar. It is hopefully\n\t\t\t\tnot overwhelming complexity.\n\t\t\t\t\n\t\t\t\tNote: the first two matches are special cases. quoted\n\t\t\t\tsymbols, and quoted empty lists are considered constant.other\n\t\t\t\t\n\t\t\t",
|
|
117
|
+
"patterns": [
|
|
118
|
+
{
|
|
119
|
+
"captures": {
|
|
120
|
+
"1": {
|
|
121
|
+
"name": "punctuation.section.quoted.symbol.scheme"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t",
|
|
125
|
+
"name": "constant.other.symbol.scheme"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"captures": {
|
|
129
|
+
"1": {
|
|
130
|
+
"name": "punctuation.section.quoted.empty-list.scheme"
|
|
131
|
+
},
|
|
132
|
+
"2": {
|
|
133
|
+
"name": "meta.expression.scheme"
|
|
134
|
+
},
|
|
135
|
+
"3": {
|
|
136
|
+
"name": "punctuation.section.expression.begin.scheme"
|
|
137
|
+
},
|
|
138
|
+
"4": {
|
|
139
|
+
"name": "punctuation.section.expression.end.scheme"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"match": "(?x)\n\t\t\t\t\t\t(')\\s*\n\t\t\t\t\t\t((\\()\\s*(\\)))\n\t\t\t\t\t",
|
|
143
|
+
"name": "constant.other.empty-list.schem"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"begin": "(')\\s*",
|
|
147
|
+
"beginCaptures": {
|
|
148
|
+
"1": {
|
|
149
|
+
"name": "punctuation.section.quoted.scheme"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"comment": "quoted double-quoted string or s-expression",
|
|
153
|
+
"end": "(?=[\\s()])|(?<=\\n)",
|
|
154
|
+
"name": "string.other.quoted-object.scheme",
|
|
155
|
+
"patterns": [
|
|
156
|
+
{
|
|
157
|
+
"include": "#quoted"
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
"quote-sexp": {
|
|
164
|
+
"begin": "(?<=\\()\\s*(quote)\\s+",
|
|
165
|
+
"beginCaptures": {
|
|
166
|
+
"1": {
|
|
167
|
+
"name": "keyword.control.quote.scheme"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"comment": "\n\t\t\t\tSomething quoted with (quote «thing»). In this case «thing»\n\t\t\t\twill not be evaluated, so we are considering it a string.\n\t\t\t",
|
|
171
|
+
"contentName": "string.other.quote.scheme",
|
|
172
|
+
"end": "(?=[\\s)])|(?<=\\n)",
|
|
173
|
+
"patterns": [
|
|
174
|
+
{
|
|
175
|
+
"include": "#quoted"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"quoted": {
|
|
180
|
+
"patterns": [
|
|
181
|
+
{
|
|
182
|
+
"include": "#string"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"begin": "(\\()",
|
|
186
|
+
"beginCaptures": {
|
|
187
|
+
"1": {
|
|
188
|
+
"name": "punctuation.section.expression.begin.scheme"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"end": "(\\))",
|
|
192
|
+
"endCaptures": {
|
|
193
|
+
"1": {
|
|
194
|
+
"name": "punctuation.section.expression.end.scheme"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"name": "meta.expression.scheme",
|
|
198
|
+
"patterns": [
|
|
199
|
+
{
|
|
200
|
+
"include": "#quoted"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"include": "#quote"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"include": "#illegal"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"sexp": {
|
|
213
|
+
"begin": "(\\()",
|
|
214
|
+
"beginCaptures": {
|
|
215
|
+
"1": {
|
|
216
|
+
"name": "punctuation.section.expression.begin.scheme"
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"end": "(\\))(\\n)?",
|
|
220
|
+
"endCaptures": {
|
|
221
|
+
"1": {
|
|
222
|
+
"name": "punctuation.section.expression.end.scheme"
|
|
223
|
+
},
|
|
224
|
+
"2": {
|
|
225
|
+
"name": "meta.after-expression.scheme"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"name": "meta.expression.scheme",
|
|
229
|
+
"patterns": [
|
|
230
|
+
{
|
|
231
|
+
"include": "#comment"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(define)\\s+ # define\n\t\t\t\t\t\t(\\() # list of parameters\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\n\t\t\t\t\t\t ((\\s+\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t )*\n\t\t\t\t\t\t )\\s*\n\t\t\t\t\t\t(\\))\n\t\t\t\t\t",
|
|
235
|
+
"captures": {
|
|
236
|
+
"1": {
|
|
237
|
+
"name": "keyword.control.scheme"
|
|
238
|
+
},
|
|
239
|
+
"2": {
|
|
240
|
+
"name": "punctuation.definition.function.scheme"
|
|
241
|
+
},
|
|
242
|
+
"3": {
|
|
243
|
+
"name": "entity.name.function.scheme"
|
|
244
|
+
},
|
|
245
|
+
"4": {
|
|
246
|
+
"name": "variable.parameter.function.scheme"
|
|
247
|
+
},
|
|
248
|
+
"7": {
|
|
249
|
+
"name": "punctuation.definition.function.scheme"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"end": "(?=\\))",
|
|
253
|
+
"name": "meta.declaration.procedure.scheme",
|
|
254
|
+
"patterns": [
|
|
255
|
+
{
|
|
256
|
+
"include": "#comment"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"include": "#sexp"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"include": "#illegal"
|
|
263
|
+
}
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"begin": "(?x)\n\t\t\t\t\t\t(?<=\\() # preceded by (\n\t\t\t\t\t\t(lambda)\\s+\n\t\t\t\t\t\t(\\() # opening paren\n\t\t\t\t\t\t((?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t \\s+\n\t\t\t\t\t\t)*(?:\n\t\t\t\t\t\t ([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*|[._])\n\t\t\t\t\t\t)?)\n\t\t\t\t\t\t(\\)) # closing paren\n\t\t\t\t\t",
|
|
268
|
+
"captures": {
|
|
269
|
+
"1": {
|
|
270
|
+
"name": "keyword.control.scheme"
|
|
271
|
+
},
|
|
272
|
+
"2": {
|
|
273
|
+
"name": "punctuation.definition.variable.scheme"
|
|
274
|
+
},
|
|
275
|
+
"3": {
|
|
276
|
+
"name": "variable.parameter.scheme"
|
|
277
|
+
},
|
|
278
|
+
"6": {
|
|
279
|
+
"name": "punctuation.definition.variable.scheme"
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"comment": "\n\t\t\t\t\t\tNot sure this one is quite correct. That \\s* is\n\t\t\t\t\t\tparticularly troubling\n\t\t\t\t\t",
|
|
283
|
+
"end": "(?=\\))",
|
|
284
|
+
"name": "meta.declaration.procedure.scheme",
|
|
285
|
+
"patterns": [
|
|
286
|
+
{
|
|
287
|
+
"include": "#comment"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"include": "#sexp"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"include": "#illegal"
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"begin": "(?<=\\()(define)\\s([[:alnum:]][[:alnum:]!$%&*+-./:<=>?@^_~]*)\\s*.*?",
|
|
299
|
+
"captures": {
|
|
300
|
+
"1": {
|
|
301
|
+
"name": "keyword.control.scheme"
|
|
302
|
+
},
|
|
303
|
+
"2": {
|
|
304
|
+
"name": "variable.other.scheme"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
"end": "(?=\\))",
|
|
308
|
+
"name": "meta.declaration.variable.scheme",
|
|
309
|
+
"patterns": [
|
|
310
|
+
{
|
|
311
|
+
"include": "#comment"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"include": "#sexp"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"include": "#illegal"
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"include": "#quote-sexp"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"include": "#quote"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"include": "#language-functions"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"include": "#string"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"include": "#constants"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"match": "(?<=[\\(\\s])(#\\\\)(space|newline|tab)(?=[\\s\\)])",
|
|
338
|
+
"name": "constant.character.named.scheme"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"match": "(?<=[\\(\\s])(#\\\\)x[0-9A-F]{2,4}(?=[\\s\\)])",
|
|
342
|
+
"name": "constant.character.hex-literal.scheme"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"match": "(?<=[\\(\\s])(#\\\\).(?=[\\s\\)])",
|
|
346
|
+
"name": "constant.character.escape.scheme"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"comment": "\n\t\t\t\t\t\tthe . in (a . b) which conses together two elements\n\t\t\t\t\t\ta and b. (a b c) == (a . (b . (c . nil)))\n\t\t\t\t\t",
|
|
350
|
+
"match": "(?<=[ ()])\\.(?=[ ()])",
|
|
351
|
+
"name": "punctuation.separator.cons.scheme"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"include": "#sexp"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"include": "#illegal"
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
"string": {
|
|
362
|
+
"begin": "(\")",
|
|
363
|
+
"beginCaptures": {
|
|
364
|
+
"1": {
|
|
365
|
+
"name": "punctuation.definition.string.begin.scheme"
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"end": "(\")",
|
|
369
|
+
"endCaptures": {
|
|
370
|
+
"1": {
|
|
371
|
+
"name": "punctuation.definition.string.end.scheme"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"name": "string.quoted.double.scheme",
|
|
375
|
+
"patterns": [
|
|
376
|
+
{
|
|
377
|
+
"match": "\\\\.",
|
|
378
|
+
"name": "constant.character.escape.scheme"
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
"scopeName": "source.scheme"
|
|
384
|
+
}
|