dialog-ide 0.5.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/CHANGELOG.md +69 -0
- package/LICENSE +201 -0
- package/README.md +211 -0
- package/THIRD_PARTY_LICENSES.md +157 -0
- package/bin/darwin-arm64/aambundle +0 -0
- package/bin/darwin-arm64/dgdebug +0 -0
- package/bin/darwin-arm64/dialogc +0 -0
- package/bin/dialog-lib/stddebug.dg +112 -0
- package/bin/dialog-lib/stdlib.dg +6730 -0
- package/bin/dialog-lib/unit.dg +187 -0
- package/dist/cli/commands/run-skein.d.ts +17 -0
- package/dist/cli/commands/run-skein.d.ts.map +1 -0
- package/dist/cli/commands/run-skein.js +105 -0
- package/dist/cli/commands/run-skein.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +12 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +42 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/test.d.ts +9 -0
- package/dist/cli/commands/test.d.ts.map +1 -0
- package/dist/cli/commands/test.js +41 -0
- package/dist/cli/commands/test.js.map +1 -0
- package/dist/cli/context.d.ts +9 -0
- package/dist/cli/context.d.ts.map +1 -0
- package/dist/cli/context.js +78 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +32 -0
- package/dist/cli.js.map +1 -0
- package/dist/dialog-cover-resize.d.ts +2 -0
- package/dist/dialog-cover-resize.d.ts.map +1 -0
- package/dist/dialog-cover-resize.js +46 -0
- package/dist/dialog-cover-resize.js.map +1 -0
- package/dist/dialog-export.d.ts +23 -0
- package/dist/dialog-export.d.ts.map +1 -0
- package/dist/dialog-export.js +133 -0
- package/dist/dialog-export.js.map +1 -0
- package/dist/dialog-feelies.d.ts +4 -0
- package/dist/dialog-feelies.d.ts.map +1 -0
- package/dist/dialog-feelies.js +62 -0
- package/dist/dialog-feelies.js.map +1 -0
- package/dist/dialog-outline.d.ts +19 -0
- package/dist/dialog-outline.d.ts.map +1 -0
- package/dist/dialog-outline.js +122 -0
- package/dist/dialog-outline.js.map +1 -0
- package/dist/dialog-project-init.d.ts +5 -0
- package/dist/dialog-project-init.d.ts.map +1 -0
- package/dist/dialog-project-init.js +107 -0
- package/dist/dialog-project-init.js.map +1 -0
- package/dist/dialog-source-coverage.d.ts +9 -0
- package/dist/dialog-source-coverage.d.ts.map +1 -0
- package/dist/dialog-source-coverage.js +61 -0
- package/dist/dialog-source-coverage.js.map +1 -0
- package/dist/dialog-source-decoration-provider.d.ts +11 -0
- package/dist/dialog-source-decoration-provider.d.ts.map +1 -0
- package/dist/dialog-source-decoration-provider.js +79 -0
- package/dist/dialog-source-decoration-provider.js.map +1 -0
- package/dist/dialog-symbol-index.d.ts +19 -0
- package/dist/dialog-symbol-index.d.ts.map +1 -0
- package/dist/dialog-symbol-index.js +107 -0
- package/dist/dialog-symbol-index.js.map +1 -0
- package/dist/dialog-symbol-provider.d.ts +5 -0
- package/dist/dialog-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-symbol-provider.js +56 -0
- package/dist/dialog-symbol-provider.js.map +1 -0
- package/dist/dialog-web-export.d.ts +25 -0
- package/dist/dialog-web-export.d.ts.map +1 -0
- package/dist/dialog-web-export.js +283 -0
- package/dist/dialog-web-export.js.map +1 -0
- package/dist/dialog-workspace-symbol-provider.d.ts +16 -0
- package/dist/dialog-workspace-symbol-provider.d.ts.map +1 -0
- package/dist/dialog-workspace-symbol-provider.js +107 -0
- package/dist/dialog-workspace-symbol-provider.js.map +1 -0
- package/dist/dialog-workspace-watcher.d.ts +22 -0
- package/dist/dialog-workspace-watcher.d.ts.map +1 -0
- package/dist/dialog-workspace-watcher.js +102 -0
- package/dist/dialog-workspace-watcher.js.map +1 -0
- package/dist/dialoged/skein/compile-error.d.ts +10 -0
- package/dist/dialoged/skein/compile-error.d.ts.map +1 -0
- package/dist/dialoged/skein/compile-error.js +28 -0
- package/dist/dialoged/skein/compile-error.js.map +1 -0
- package/dist/dialoged/skein/dynamic.d.ts +14 -0
- package/dist/dialoged/skein/dynamic.d.ts.map +1 -0
- package/dist/dialoged/skein/dynamic.js +176 -0
- package/dist/dialoged/skein/dynamic.js.map +1 -0
- package/dist/dialoged/skein/frotz-build.d.ts +10 -0
- package/dist/dialoged/skein/frotz-build.d.ts.map +1 -0
- package/dist/dialoged/skein/frotz-build.js +70 -0
- package/dist/dialoged/skein/frotz-build.js.map +1 -0
- package/dist/dialoged/skein/index.d.ts +15 -0
- package/dist/dialoged/skein/index.d.ts.map +1 -0
- package/dist/dialoged/skein/index.js +31 -0
- package/dist/dialoged/skein/index.js.map +1 -0
- package/dist/dialoged/skein/io.d.ts +15 -0
- package/dist/dialoged/skein/io.d.ts.map +1 -0
- package/dist/dialoged/skein/io.js +53 -0
- package/dist/dialoged/skein/io.js.map +1 -0
- package/dist/dialoged/skein/persistence.d.ts +13 -0
- package/dist/dialoged/skein/persistence.d.ts.map +1 -0
- package/dist/dialoged/skein/persistence.js +228 -0
- package/dist/dialoged/skein/persistence.js.map +1 -0
- package/dist/dialoged/skein/process.d.ts +38 -0
- package/dist/dialoged/skein/process.d.ts.map +1 -0
- package/dist/dialoged/skein/process.js +189 -0
- package/dist/dialoged/skein/process.js.map +1 -0
- package/dist/dialoged/skein/progress.d.ts +17 -0
- package/dist/dialoged/skein/progress.d.ts.map +1 -0
- package/dist/dialoged/skein/progress.js +9 -0
- package/dist/dialoged/skein/progress.js.map +1 -0
- package/dist/dialoged/skein/project.d.ts +44 -0
- package/dist/dialoged/skein/project.d.ts.map +1 -0
- package/dist/dialoged/skein/project.js +223 -0
- package/dist/dialoged/skein/project.js.map +1 -0
- package/dist/dialoged/skein/search.d.ts +15 -0
- package/dist/dialoged/skein/search.d.ts.map +1 -0
- package/dist/dialoged/skein/search.js +99 -0
- package/dist/dialoged/skein/search.js.map +1 -0
- package/dist/dialoged/skein/service.d.ts +91 -0
- package/dist/dialoged/skein/service.d.ts.map +1 -0
- package/dist/dialoged/skein/service.js +1097 -0
- package/dist/dialoged/skein/service.js.map +1 -0
- package/dist/dialoged/skein/session.d.ts +96 -0
- package/dist/dialoged/skein/session.d.ts.map +1 -0
- package/dist/dialoged/skein/session.js +690 -0
- package/dist/dialoged/skein/session.js.map +1 -0
- package/dist/dialoged/skein/syntax.d.ts +5 -0
- package/dist/dialoged/skein/syntax.d.ts.map +1 -0
- package/dist/dialoged/skein/syntax.js +150 -0
- package/dist/dialoged/skein/syntax.js.map +1 -0
- package/dist/dialoged/skein/trace.d.ts +31 -0
- package/dist/dialoged/skein/trace.d.ts.map +1 -0
- package/dist/dialoged/skein/trace.js +172 -0
- package/dist/dialoged/skein/trace.js.map +1 -0
- package/dist/dialoged/skein/tree.d.ts +114 -0
- package/dist/dialoged/skein/tree.d.ts.map +1 -0
- package/dist/dialoged/skein/tree.js +701 -0
- package/dist/dialoged/skein/tree.js.map +1 -0
- package/dist/dialoged/skein/ui/ansi.d.ts +4 -0
- package/dist/dialoged/skein/ui/ansi.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/ansi.js +215 -0
- package/dist/dialoged/skein/ui/ansi.js.map +1 -0
- package/dist/dialoged/skein/ui/diff.d.ts +7 -0
- package/dist/dialoged/skein/ui/diff.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/diff.js +17 -0
- package/dist/dialoged/skein/ui/diff.js.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts +5 -0
- package/dist/dialoged/skein/ui/knot-menu.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/knot-menu.js +89 -0
- package/dist/dialoged/skein/ui/knot-menu.js.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts +5 -0
- package/dist/dialoged/skein/ui/marker-colors.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/marker-colors.js +18 -0
- package/dist/dialoged/skein/ui/marker-colors.js.map +1 -0
- package/dist/dialoged/skein/ui/render.d.ts +13 -0
- package/dist/dialoged/skein/ui/render.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/render.js +332 -0
- package/dist/dialoged/skein/ui/render.js.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts +11 -0
- package/dist/dialoged/skein/ui/traceRender.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/traceRender.js +139 -0
- package/dist/dialoged/skein/ui/traceRender.js.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts +3 -0
- package/dist/dialoged/skein/ui/tree-pane.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/tree-pane.js +135 -0
- package/dist/dialoged/skein/ui/tree-pane.js.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts +29 -0
- package/dist/dialoged/skein/ui/webExportPage.d.ts.map +1 -0
- package/dist/dialoged/skein/ui/webExportPage.js +72 -0
- package/dist/dialoged/skein/ui/webExportPage.js.map +1 -0
- package/dist/extension.d.ts +4 -0
- package/dist/extension.d.ts.map +1 -0
- package/dist/extension.js +885 -0
- package/dist/extension.js.map +1 -0
- package/dist/session-runner.d.ts +23 -0
- package/dist/session-runner.d.ts.map +1 -0
- package/dist/session-runner.js +92 -0
- package/dist/session-runner.js.map +1 -0
- package/language-configuration.json +43 -0
- package/media/icon.png +0 -0
- package/media/icons/arrow-down-circle-solid.svg +3 -0
- package/media/icons/arrow-down-solid.svg +3 -0
- package/media/icons/arrow-path-solid.svg +3 -0
- package/media/icons/arrow-right-solid.svg +3 -0
- package/media/icons/arrow-up-on-square-stack-solid.svg +5 -0
- package/media/icons/arrow-up-solid.svg +3 -0
- package/media/icons/arrow-uturn-left.svg +3 -0
- package/media/icons/arrow-uturn-right.svg +3 -0
- package/media/icons/bookmark-solid.svg +3 -0
- package/media/icons/bug-ant-solid.svg +3 -0
- package/media/icons/check-badge-solid.svg +3 -0
- package/media/icons/check-circle-solid.svg +3 -0
- package/media/icons/chevron-double-down-solid.svg +4 -0
- package/media/icons/chevron-double-up-solid.svg +4 -0
- package/media/icons/command-line-solid.svg +3 -0
- package/media/icons/cpu-chip-solid.svg +4 -0
- package/media/icons/dg-file-dark.svg +6 -0
- package/media/icons/dg-file-light.svg +6 -0
- package/media/icons/ellipsis-vertical-solid.svg +3 -0
- package/media/icons/exclamation-triangle.svg +3 -0
- package/media/icons/folder-arrow-down-solid.svg +3 -0
- package/media/icons/globe-alt.svg +3 -0
- package/media/icons/lock-closed-solid.svg +3 -0
- package/media/icons/magnifying-glass-solid.svg +3 -0
- package/media/icons/pencil-solid.svg +4 -0
- package/media/icons/play-solid.svg +3 -0
- package/media/icons/plus-circle-solid.svg +3 -0
- package/media/icons/scissors-solid.svg +5 -0
- package/media/icons/tag-solid.svg +3 -0
- package/media/icons/trash-solid.svg +3 -0
- package/media/icons/x-circle-solid.svg +3 -0
- package/media/js/datastar.js +9 -0
- package/media/js/main.js +1109 -0
- package/media/js/skein-loader.js +10 -0
- package/media/js/trace-loader.js +4 -0
- package/media/js/trace.js +147 -0
- package/media/style.css +5783 -0
- package/package.json +231 -0
- package/resources/bundle/default-cover.png +0 -0
- package/resources/bundle/introduction-to-if.pdf +0 -0
- package/resources/bundle/play-if-card.pdf +1990 -1
- package/resources/bundle/play.css +432 -0
- package/resources/bundle/style.css +450 -0
- package/resources/dfrotz-skein-patch.dg +4 -0
- package/syntaxes/dialog.tmLanguage.json +490 -0
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
|
3
|
+
"name": "Dialog",
|
|
4
|
+
"scopeName": "source.dg",
|
|
5
|
+
"patterns": [
|
|
6
|
+
{
|
|
7
|
+
"include": "#comment"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"include": "#lineCurrentTopicDeclaration"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"include": "#lineSpecialDeclaration"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"include": "#lineKeywordRedefinition"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"include": "#lineRuleDefinition"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"include": "#lineBody"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"include": "#unexpected"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"comment": {
|
|
30
|
+
"name": "comment.line.percentage.dg",
|
|
31
|
+
"match": "%%.*$"
|
|
32
|
+
},
|
|
33
|
+
"lineCurrentTopicDeclaration": {
|
|
34
|
+
"comment": "Lines that start with a `#` set the current topic.",
|
|
35
|
+
"begin": "^(?=#)",
|
|
36
|
+
"end": "$",
|
|
37
|
+
"patterns": [
|
|
38
|
+
{
|
|
39
|
+
"name": "markup.heading.dg",
|
|
40
|
+
"match": "^#[\\w\\+-]*"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"include": "#comment"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"comment": "Anything else on the same line as the current topic is illegal.",
|
|
47
|
+
"name": "invalid.illegal.dg",
|
|
48
|
+
"match": "\\S+"
|
|
49
|
+
}
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"lineSpecialDeclaration": {
|
|
53
|
+
"comment": "Special declarations are things like `(global variable (my-var $))` that look like rule declarations, but are in fact special so they are highlighted as keywords.",
|
|
54
|
+
"patterns": [
|
|
55
|
+
{
|
|
56
|
+
"match": "(\\(\\s*(?:global\\s+variable|interface|generate\\s+(0|[1-9]\\d*)))\\s*(\\()(.+?)(\\))(\\s*\\))",
|
|
57
|
+
"comment": "1 is the opening parenthesis. 2 is the number in `(generate 9 (grape $))`. 3 is the opening parenthesis of the nested query. 4 is the query's contents. 5 is the closing parenthesis of the nested query. 6 is the closing parenthesis.",
|
|
58
|
+
"captures": {
|
|
59
|
+
"1": {
|
|
60
|
+
"name": "keyword.control.dg"
|
|
61
|
+
},
|
|
62
|
+
"2": {
|
|
63
|
+
"name": "constant.numeric.dg"
|
|
64
|
+
},
|
|
65
|
+
"3": {
|
|
66
|
+
"name": "entity.name.function.dg"
|
|
67
|
+
},
|
|
68
|
+
"4": {
|
|
69
|
+
"patterns": [
|
|
70
|
+
{
|
|
71
|
+
"include": "#queryContents"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"5": {
|
|
76
|
+
"name": "entity.name.function.dg"
|
|
77
|
+
},
|
|
78
|
+
"6": {
|
|
79
|
+
"name": "keyword.control.dg"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"lineRuleDefinition": {
|
|
86
|
+
"comment": "Lines that start with a parenthesis are rule definitions. They can optionally be preceded by `@` (access predicates) or `~` (negated rules).",
|
|
87
|
+
"begin": "^(?=(@|~)?\\()",
|
|
88
|
+
"end": "$",
|
|
89
|
+
"patterns": [
|
|
90
|
+
{
|
|
91
|
+
"include": "#ruleHead"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"comment": "The body of a rule can start on the same line as its definition (as in `(name *) lamp`).",
|
|
95
|
+
"include": "#body"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"ruleHead": {
|
|
100
|
+
"comment": "That's the rule definition proper, starting at an opening parenthesis and ending at a closing one. The patterns are the words and arguments between the parentheses.",
|
|
101
|
+
"name": "meta.function.dg",
|
|
102
|
+
"begin": "^(@)?(~)?(\\()",
|
|
103
|
+
"beginCaptures": {
|
|
104
|
+
"1": {
|
|
105
|
+
"name": "storage.modifier.dg"
|
|
106
|
+
},
|
|
107
|
+
"2": {
|
|
108
|
+
"name": "keyword.control.dg"
|
|
109
|
+
},
|
|
110
|
+
"3": {
|
|
111
|
+
"name": "entity.name.function.dg"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"end": "\\)",
|
|
115
|
+
"endCaptures": {
|
|
116
|
+
"0": {
|
|
117
|
+
"name": "entity.name.function.dg"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"patterns": [
|
|
121
|
+
{
|
|
122
|
+
"comment": "Rules can contain nested queries.",
|
|
123
|
+
"include": "#query"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"comment": "Parameters (i.e. `$Obj`) are listed before '#value' to have precedence over variables (that are included in '#value').",
|
|
127
|
+
"include": "#parameter"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"include": "#value"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"comment": "The words in the rule signature.",
|
|
134
|
+
"include": "#ruleName"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"include": "#comment"
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"ruleName": {
|
|
142
|
+
"comment": "The words in rule names. Dialog's documentation is not clear about the allowed characters in rules, so we may need to add more if some are not covered.",
|
|
143
|
+
"name": "entity.name.function.dg",
|
|
144
|
+
"match": "[\\w'\\+=<>:-]+"
|
|
145
|
+
},
|
|
146
|
+
"lineBody": {
|
|
147
|
+
"comment": "Indented lines are rule contents.",
|
|
148
|
+
"begin": "^\\s",
|
|
149
|
+
"end": "$",
|
|
150
|
+
"patterns": [
|
|
151
|
+
{
|
|
152
|
+
"include": "#body"
|
|
153
|
+
}
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
"body": {
|
|
157
|
+
"comment": "The contents of rules. Can be on the same line of a rule definition, or on indented lines.",
|
|
158
|
+
"patterns": [
|
|
159
|
+
{
|
|
160
|
+
"include": "#comment"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"include": "#bodyEscape"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"include": "#keyword"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"include": "#query"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"comment": "Has to be before '#value', so that braces are not treated as closures (which are defined in '#value'). It's easier to deal with that way.",
|
|
173
|
+
"include": "#brace"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"include": "#value"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"include": "#bodyInvalid"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
"bodyEscape": {
|
|
184
|
+
"comment": "A backslash followed by a non-space character.",
|
|
185
|
+
"name": "constant.character.escape.dg",
|
|
186
|
+
"match": "\\\\\\S"
|
|
187
|
+
},
|
|
188
|
+
"bodyInvalid": {
|
|
189
|
+
"patterns": [
|
|
190
|
+
{
|
|
191
|
+
"comment": "Lone, non-escaped closing parentheses are not allowed in rule bodies.",
|
|
192
|
+
"name": "invalid.illegal.dg",
|
|
193
|
+
"match": "\\)"
|
|
194
|
+
}
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"query": {
|
|
198
|
+
"comment": "Queries are between parentheses, optionally preceded by an asterisk or a negation.",
|
|
199
|
+
"begin": "(\\*|~)?(\\()",
|
|
200
|
+
"beginCaptures": {
|
|
201
|
+
"1": {
|
|
202
|
+
"name": "keyword.control.dg"
|
|
203
|
+
},
|
|
204
|
+
"2": {
|
|
205
|
+
"name": "entity.name.function.dg"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"end": "\\)",
|
|
209
|
+
"endCaptures": {
|
|
210
|
+
"0": {
|
|
211
|
+
"name": "entity.name.function.dg"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"patterns": [
|
|
215
|
+
{
|
|
216
|
+
"include": "#queryContents"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
"queryContents": {
|
|
221
|
+
"patterns": [
|
|
222
|
+
{
|
|
223
|
+
"include": "#query"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"include": "#value"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"include": "#ruleName"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"include": "#comment"
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
"keyword": {
|
|
237
|
+
"comment": "Dialog doesn't have keywords per se, so those are the special syntax (multipart like if/then/else, or affecting the next statement like exhausts). See also '#lineKeywordRedefinition'",
|
|
238
|
+
"patterns": [
|
|
239
|
+
{
|
|
240
|
+
"name": "keyword.control.dg",
|
|
241
|
+
"match": "\\(\\s*(if|then|elseif|else|endif|select|or|(then\\s+)?(purely\\s+)?at\\s+random|stopping|cycling|exhaust|now|just|stoppable|log|collect\\s+words|from\\s+words|link)\\s*\\)|~"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"match": "(\\(\\s*(?:collect|accumulate|into|determine\\s+object|matching\\s+all\\s+of|span|div|(?:inline\\s+)?status\\s+bar|link(?:\\s+resource)?))\\s+([#\\$@\\[\\{\\d\\*].*?)(\\s*\\))",
|
|
245
|
+
"captures": {
|
|
246
|
+
"1": {
|
|
247
|
+
"name": "keyword.control.dg"
|
|
248
|
+
},
|
|
249
|
+
"2": {
|
|
250
|
+
"patterns": [
|
|
251
|
+
{
|
|
252
|
+
"include": "#value"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
"3": {
|
|
257
|
+
"name": "keyword.control.dg"
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
]
|
|
262
|
+
},
|
|
263
|
+
"lineKeywordRedefinition": {
|
|
264
|
+
"comment": "Those are the same than in '#keyword', but marked as errors when they appear at the beginning of a line (because we cannot redefine special syntax).",
|
|
265
|
+
"patterns": [
|
|
266
|
+
{
|
|
267
|
+
"name": "invalid.illegal.dg",
|
|
268
|
+
"match": "^\\(\\s*(if|then|elseif|else|endif|select|or|(then\\s+)?(purely\\s+)?at\\s+random|stopping|cycling|exhaust|now|just|stoppable|log|from\\s+words|link)\\s*\\)"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"match": "^(\\(\\s*(?:collect(?:\\s+words)?|accumulate|into|determine\\s+object|matching\\s+all\\s+of|span|div|(?:inline\\s+)?status\\s+bar|link(?:\\s+resource)?))\\s+([#\\$@\\[\\{\\d\\*].*?)(\\s*\\))",
|
|
272
|
+
"captures": {
|
|
273
|
+
"1": {
|
|
274
|
+
"name": "invalid.illegal.dg"
|
|
275
|
+
},
|
|
276
|
+
"2": {
|
|
277
|
+
"patterns": [
|
|
278
|
+
{
|
|
279
|
+
"include": "#value"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"3": {
|
|
284
|
+
"name": "invalid.illegal.dg"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"value": {
|
|
291
|
+
"patterns": [
|
|
292
|
+
{
|
|
293
|
+
"include": "#list"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"include": "#closure"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"include": "#object"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"include": "#currentTopic"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"include": "#dictWord"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"include": "#variable"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"include": "#number"
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
},
|
|
315
|
+
"object": {
|
|
316
|
+
"comment": "We make the object name after the `#` optional so that's easier to spot a lone `#`. (A hash without a name is actually invalid, but we don't want to flag the hash every time an author starts writing an object's name.)",
|
|
317
|
+
"name": "constant.language.dg",
|
|
318
|
+
"match": "#[\\w\\+-]*"
|
|
319
|
+
},
|
|
320
|
+
"currentTopic": {
|
|
321
|
+
"name": "variable.language.dg",
|
|
322
|
+
"match": "\\*"
|
|
323
|
+
},
|
|
324
|
+
"number": {
|
|
325
|
+
"comment": "Numbers cannot start with leading zeros, hence the division in two cases. A minus sign counts as a word boundary so we check this case explicitly.",
|
|
326
|
+
"name": "constant.numeric.dg",
|
|
327
|
+
"match": "\\b(?<!-)(0|[1-9]\\d*)\\b"
|
|
328
|
+
},
|
|
329
|
+
"variable": {
|
|
330
|
+
"name": "variable.other.dg",
|
|
331
|
+
"match": "\\$[\\w\\+<>-]*"
|
|
332
|
+
},
|
|
333
|
+
"parameter": {
|
|
334
|
+
"name": "variable.parameter.dg",
|
|
335
|
+
"match": "\\$[\\w\\+<>-]*"
|
|
336
|
+
},
|
|
337
|
+
"list": {
|
|
338
|
+
"begin": "\\[",
|
|
339
|
+
"beginCaptures": {
|
|
340
|
+
"0": {
|
|
341
|
+
"name": "punctuation.definition.list.dg"
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
"end": "\\]",
|
|
345
|
+
"endCaptures": {
|
|
346
|
+
"0": {
|
|
347
|
+
"name": "punctuation.definition.list.dg"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"patterns": [
|
|
351
|
+
{
|
|
352
|
+
"include": "#comment"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"include": "#query"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"include": "#value"
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"include": "#bareDictWord"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
"closure": {
|
|
366
|
+
"begin": "\\{",
|
|
367
|
+
"beginCaptures": {
|
|
368
|
+
"0": {
|
|
369
|
+
"name": "punctuation.definition.block.dg"
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"end": "\\}",
|
|
373
|
+
"endCaptures": {
|
|
374
|
+
"0": {
|
|
375
|
+
"name": "punctuation.definition.block.dg"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"patterns": [
|
|
379
|
+
{
|
|
380
|
+
"include": "#body"
|
|
381
|
+
}
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
"dictWord": {
|
|
385
|
+
"comment": "Some characters are only valid in dictionary words of length 1, so we split the two cases, with single-character words having priority.",
|
|
386
|
+
"patterns": [
|
|
387
|
+
{
|
|
388
|
+
"include": "#dictWordSingle"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"include": "#dictWordMultiple"
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
},
|
|
395
|
+
"bareDictWord": {
|
|
396
|
+
"comment": "Bare dictionary words are the ones without the leading `@`, used in lists.",
|
|
397
|
+
"patterns": [
|
|
398
|
+
{
|
|
399
|
+
"include": "#bareDictWordSingle"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"include": "#bareDictWordMultiple"
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"dictWordSingle": {
|
|
407
|
+
"comment": "An `@` followed by a stop character or a character representing a keypress, and ending right before a space or a Dialog special character.",
|
|
408
|
+
"patterns": [
|
|
409
|
+
{
|
|
410
|
+
"comment": "Characters that don't need to be escaped.",
|
|
411
|
+
"name": "string.quoted.other.dg",
|
|
412
|
+
"match": "@[\\.,;\"](?=[\\s#\\$@~\\*\\|\\\\\\(\\)\\[\\]\\{\\}%])"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"comment": "Characters that need to be escaped with a backslash. The letters represent the space, the newline and the arrows.",
|
|
416
|
+
"name": "string.quoted.other.dg",
|
|
417
|
+
"match": "@(\\\\[\\*\\(\\)\\|nsbudlr])(?=[\\s#\\$@~\\*\\|\\\\\\(\\)\\[\\]\\{\\}%])",
|
|
418
|
+
"captures": {
|
|
419
|
+
"1": {
|
|
420
|
+
"name": "constant.character.escape"
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"bareDictWordSingle": {
|
|
427
|
+
"comment": "A stop character or a character representing a keypress, right before a space or a Dialog special character.",
|
|
428
|
+
"patterns": [
|
|
429
|
+
{
|
|
430
|
+
"comment": "Characters that don't need to be escaped.",
|
|
431
|
+
"name": "string.unquoted.dg",
|
|
432
|
+
"match": "[\\.,;\"](?=[\\s#\\$@~\\*\\|\\\\\\(\\)\\[\\]\\{\\}%])"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"comment": "Characters that need to be escaped with a backslash. The letters represent the space, the newline and the arrows.",
|
|
436
|
+
"name": "string.unquoted.dg",
|
|
437
|
+
"match": "\\\\[\\*\\(\\)\\|nsbudlr](?=[\\s#\\$@~\\*\\|\\\\\\(\\)\\[\\]\\{\\}%])",
|
|
438
|
+
"captures": {
|
|
439
|
+
"0": {
|
|
440
|
+
"name": "constant.character.escape"
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
},
|
|
446
|
+
"dictWordMultiple": {
|
|
447
|
+
"comment": "Begins with an `@` and ends right before a space or a Dialog special character.",
|
|
448
|
+
"name": "string.quoted.other.dg",
|
|
449
|
+
"begin": "@",
|
|
450
|
+
"end": "(?=[\\s#\\$@~\\*\\|\\(\\)\\[\\]\\{\\}%])",
|
|
451
|
+
"patterns": [
|
|
452
|
+
{
|
|
453
|
+
"include": "#dictWordContents"
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
"bareDictWordMultiple": {
|
|
458
|
+
"comment": "Begins right before something that is not a space nor a Dialog special character, and ends right before a space or a Dialog special character.",
|
|
459
|
+
"name": "string.unquoted.dg",
|
|
460
|
+
"begin": "(?![\\s#\\$@~\\*\\|\\(\\)\\[\\]\\{\\}%/])",
|
|
461
|
+
"end": "(?=[\\s#\\$@~\\*\\|\\(\\)\\[\\]\\{\\}%/])",
|
|
462
|
+
"patterns": [
|
|
463
|
+
{
|
|
464
|
+
"include": "#dictWordContents"
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
},
|
|
468
|
+
"dictWordContents": {
|
|
469
|
+
"patterns": [
|
|
470
|
+
{
|
|
471
|
+
"comment": "Stop characters and character representing keypresses are invalid since they can only appear in dictionary words of length 1.",
|
|
472
|
+
"name": "invalid.illegal.dg",
|
|
473
|
+
"match": "\\.|,|;|\"|\\\\[\\*\\(\\)nsbudlr]"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "constant.character.escape.dg",
|
|
477
|
+
"match": "\\\\\\S"
|
|
478
|
+
}
|
|
479
|
+
]
|
|
480
|
+
},
|
|
481
|
+
"brace": {
|
|
482
|
+
"name": "punctuation.definition.block.dg",
|
|
483
|
+
"match": "\\{|\\}"
|
|
484
|
+
},
|
|
485
|
+
"unexpected": {
|
|
486
|
+
"name": "invalid.illegal.dg",
|
|
487
|
+
"match": "[^\\s%]+"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|