monaco-languageclient-examples 2025.8.4 → 2025.8.6
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 +9 -1
- package/dist/browser/main.d.ts +1 -0
- package/dist/browser/main.d.ts.map +1 -1
- package/dist/browser/main.js +2 -1
- package/dist/browser/main.js.map +1 -1
- package/dist/json/client/client.d.ts.map +1 -1
- package/dist/json/client/client.js +4 -1
- package/dist/json/client/client.js.map +1 -1
- package/dist/langium/langium-dsl/config/extendedConfig.d.ts +1 -6
- package/dist/langium/langium-dsl/config/extendedConfig.d.ts.map +1 -1
- package/dist/langium/langium-dsl/config/extendedConfig.js +77 -23
- package/dist/langium/langium-dsl/config/extendedConfig.js.map +1 -1
- package/dist/langium/langium-dsl/config/langium.configuration.json +10 -40
- package/dist/langium/langium-dsl/config/langium.tmLanguage.json +1 -1
- package/dist/langium/langium-dsl/main.d.ts +2 -0
- package/dist/langium/langium-dsl/main.d.ts.map +1 -0
- package/dist/langium/langium-dsl/main.js +26 -0
- package/dist/langium/langium-dsl/main.js.map +1 -0
- package/dist/langium/statemachine/main-react.d.ts.map +1 -1
- package/dist/langium/statemachine/main-react.js +6 -1
- package/dist/langium/statemachine/main-react.js.map +1 -1
- package/dist/python/client/reactPython.d.ts.map +1 -1
- package/dist/python/client/reactPython.js +6 -1
- package/dist/python/client/reactPython.js.map +1 -1
- package/ghp_langium_extended.html +3 -3
- package/index.html +1 -1
- package/langium_extended.html +4 -6
- package/package.json +6 -6
- package/src/browser/main.ts +2 -1
- package/src/json/client/client.ts +4 -1
- package/src/langium/langium-dsl/config/extendedConfig.ts +87 -31
- package/src/langium/langium-dsl/config/langium.configuration.json +128 -158
- package/src/langium/langium-dsl/config/langium.tmLanguage.json +271 -271
- package/src/langium/langium-dsl/main.ts +31 -0
- package/src/langium/statemachine/main-react.tsx +6 -0
- package/src/python/client/reactPython.tsx +6 -0
- package/vite.production.base.ts +0 -1
- package/dist/langium/langium-dsl/config/classicConfig.d.ts +0 -7
- package/dist/langium/langium-dsl/config/classicConfig.d.ts.map +0 -1
- package/dist/langium/langium-dsl/config/classicConfig.js +0 -74
- package/dist/langium/langium-dsl/config/classicConfig.js.map +0 -1
- package/dist/langium/langium-dsl/wrapperLangium.d.ts +0 -2
- package/dist/langium/langium-dsl/wrapperLangium.d.ts.map +0 -1
- package/dist/langium/langium-dsl/wrapperLangium.js +0 -86
- package/dist/langium/langium-dsl/wrapperLangium.js.map +0 -1
- package/ghp_langium_classic.html +0 -26
- package/langium_classic.html +0 -26
- package/src/langium/langium-dsl/config/classicConfig.ts +0 -88
- package/src/langium/langium-dsl/wrapperLangium.ts +0 -95
|
@@ -1,290 +1,290 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
{
|
|
9
|
-
"include": "#regex"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"include": "#comments"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "keyword.control.langium",
|
|
16
|
-
"match": "\\b(current|entry|extends|fragment|grammar|hidden|import|infer|infers|interface|returns|terminal|type|with)\\b"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"name": "constant.language.langium",
|
|
20
|
-
"match": "\\b(?i:true|false)\\b"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "keyword.symbol.langium",
|
|
24
|
-
"match": "(\\{|\\}|\\:|\\]|\\[|\\(|\\)|(\\??|\\+?)\\=|->|\\=>|<|>|\\,|\\*|\\+|\\@|\\||\\&|\\?|\\!|\\;)"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "string.quoted.double.langium",
|
|
28
|
-
"begin": "\"",
|
|
29
|
-
"end": "\"",
|
|
30
|
-
"patterns": [
|
|
2
|
+
"name": "Langium",
|
|
3
|
+
"scopeName": "source.langium",
|
|
4
|
+
"fileTypes": [
|
|
5
|
+
"langium"
|
|
6
|
+
],
|
|
7
|
+
"patterns": [
|
|
31
8
|
{
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "string.quoted.single.langium",
|
|
38
|
-
"begin": "'",
|
|
39
|
-
"end": "'",
|
|
40
|
-
"patterns": [
|
|
41
|
-
{
|
|
42
|
-
"include": "#string-character-escape"
|
|
43
|
-
}
|
|
44
|
-
]
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"repository": {
|
|
48
|
-
"comments": {
|
|
49
|
-
"patterns": [
|
|
50
|
-
{
|
|
51
|
-
"name": "comment.block.langium",
|
|
52
|
-
"begin": "/\\*",
|
|
53
|
-
"beginCaptures": {
|
|
54
|
-
"0": {
|
|
55
|
-
"name": "punctuation.definition.comment.langium"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
"end": "\\*/",
|
|
59
|
-
"endCaptures": {
|
|
60
|
-
"0": {
|
|
61
|
-
"name": "punctuation.definition.comment.langium"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"begin": "(^\\s+)?(?=//)",
|
|
67
|
-
"beginCaptures": {
|
|
68
|
-
"1": {
|
|
69
|
-
"name": "punctuation.whitespace.comment.leading.cs"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"end": "(?=$)",
|
|
73
|
-
"name": "comment.line.langium"
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
},
|
|
77
|
-
"string-character-escape": {
|
|
78
|
-
"name": "constant.character.escape.langium",
|
|
79
|
-
"match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
|
80
|
-
},
|
|
81
|
-
"regex": {
|
|
82
|
-
"patterns": [
|
|
83
|
-
{
|
|
84
|
-
"name": "string.regexp.ts",
|
|
85
|
-
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([a-z]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
|
|
86
|
-
"beginCaptures": {
|
|
87
|
-
"1": {
|
|
88
|
-
"name": "punctuation.definition.string.begin.ts"
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"end": "(/)([a-z]*)",
|
|
92
|
-
"endCaptures": {
|
|
93
|
-
"1": {
|
|
94
|
-
"name": "punctuation.definition.string.end.ts"
|
|
95
|
-
},
|
|
96
|
-
"2": {
|
|
97
|
-
"name": "keyword.other.ts"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"patterns": [
|
|
101
|
-
{
|
|
102
|
-
"include": "#regexp"
|
|
103
|
-
}
|
|
104
|
-
]
|
|
9
|
+
"include": "#regex"
|
|
105
10
|
},
|
|
106
11
|
{
|
|
107
|
-
|
|
108
|
-
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([a-z]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
|
|
109
|
-
"beginCaptures": {
|
|
110
|
-
"0": {
|
|
111
|
-
"name": "punctuation.definition.string.begin.ts"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"end": "(/)([a-z]*)",
|
|
115
|
-
"endCaptures": {
|
|
116
|
-
"1": {
|
|
117
|
-
"name": "punctuation.definition.string.end.ts"
|
|
118
|
-
},
|
|
119
|
-
"2": {
|
|
120
|
-
"name": "keyword.other.ts"
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
"patterns": [
|
|
124
|
-
{
|
|
125
|
-
"include": "#regexp"
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
},
|
|
131
|
-
"regexp": {
|
|
132
|
-
"patterns": [
|
|
133
|
-
{
|
|
134
|
-
"name": "keyword.control.anchor.regexp",
|
|
135
|
-
"match": "\\\\[bB]|\\^|\\$"
|
|
12
|
+
"include": "#comments"
|
|
136
13
|
},
|
|
137
14
|
{
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
"0": {
|
|
141
|
-
"name": "keyword.other.back-reference.regexp"
|
|
142
|
-
},
|
|
143
|
-
"1": {
|
|
144
|
-
"name": "variable.other.regexp"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
15
|
+
"name": "keyword.control.langium",
|
|
16
|
+
"match": "\\b(left|right|assoc|current|entry|extends|fragment|grammar|hidden|import|infer|infers|infix|interface|returns|terminal|type|with|on)\\b"
|
|
147
17
|
},
|
|
148
18
|
{
|
|
149
|
-
|
|
150
|
-
|
|
19
|
+
"name": "constant.language.langium",
|
|
20
|
+
"match": "\\b(?i:true|false)\\b"
|
|
151
21
|
},
|
|
152
22
|
{
|
|
153
|
-
|
|
154
|
-
|
|
23
|
+
"name": "keyword.symbol.langium",
|
|
24
|
+
"match": "(\\{|\\}|\\:|\\]|\\[|\\(|\\)|(\\??|\\+?)\\=|->|\\=>|<|>|\\,|\\*|\\+|\\@|\\||\\&|\\?|\\!|\\;)"
|
|
155
25
|
},
|
|
156
26
|
{
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
"
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
},
|
|
166
|
-
"3": {
|
|
167
|
-
"name": "meta.assertion.look-ahead.regexp"
|
|
168
|
-
},
|
|
169
|
-
"4": {
|
|
170
|
-
"name": "meta.assertion.negative-look-ahead.regexp"
|
|
171
|
-
},
|
|
172
|
-
"5": {
|
|
173
|
-
"name": "meta.assertion.look-behind.regexp"
|
|
174
|
-
},
|
|
175
|
-
"6": {
|
|
176
|
-
"name": "meta.assertion.negative-look-behind.regexp"
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
"end": "(\\))",
|
|
180
|
-
"endCaptures": {
|
|
181
|
-
"1": {
|
|
182
|
-
"name": "punctuation.definition.group.regexp"
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"patterns": [
|
|
186
|
-
{
|
|
187
|
-
"include": "#regexp"
|
|
188
|
-
}
|
|
189
|
-
]
|
|
27
|
+
"name": "string.quoted.double.langium",
|
|
28
|
+
"begin": "\"",
|
|
29
|
+
"end": "\"",
|
|
30
|
+
"patterns": [
|
|
31
|
+
{
|
|
32
|
+
"include": "#string-character-escape"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
190
35
|
},
|
|
191
36
|
{
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
"begin": "(\\[)(\\^)?",
|
|
220
|
-
"beginCaptures": {
|
|
221
|
-
"1": {
|
|
222
|
-
"name": "punctuation.definition.character-class.regexp"
|
|
223
|
-
},
|
|
224
|
-
"2": {
|
|
225
|
-
"name": "keyword.operator.negation.regexp"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
"end": "(\\])",
|
|
229
|
-
"endCaptures": {
|
|
230
|
-
"1": {
|
|
231
|
-
"name": "punctuation.definition.character-class.regexp"
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
"patterns": [
|
|
235
|
-
{
|
|
236
|
-
"name": "constant.other.character-class.range.regexp",
|
|
237
|
-
"match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
|
|
238
|
-
"captures": {
|
|
239
|
-
"1": {
|
|
240
|
-
"name": "constant.character.numeric.regexp"
|
|
241
|
-
},
|
|
242
|
-
"2": {
|
|
243
|
-
"name": "constant.character.control.regexp"
|
|
244
|
-
},
|
|
245
|
-
"3": {
|
|
246
|
-
"name": "constant.character.escape.backslash.regexp"
|
|
247
|
-
},
|
|
248
|
-
"4": {
|
|
249
|
-
"name": "constant.character.numeric.regexp"
|
|
250
|
-
},
|
|
251
|
-
"5": {
|
|
252
|
-
"name": "constant.character.control.regexp"
|
|
37
|
+
"name": "string.quoted.single.langium",
|
|
38
|
+
"begin": "'",
|
|
39
|
+
"end": "'",
|
|
40
|
+
"patterns": [
|
|
41
|
+
{
|
|
42
|
+
"include": "#string-character-escape"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"repository": {
|
|
48
|
+
"comments": {
|
|
49
|
+
"patterns": [
|
|
50
|
+
{
|
|
51
|
+
"name": "comment.block.langium",
|
|
52
|
+
"begin": "/\\*",
|
|
53
|
+
"beginCaptures": {
|
|
54
|
+
"0": {
|
|
55
|
+
"name": "punctuation.definition.comment.langium"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"end": "\\*/",
|
|
59
|
+
"endCaptures": {
|
|
60
|
+
"0": {
|
|
61
|
+
"name": "punctuation.definition.comment.langium"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
253
64
|
},
|
|
254
|
-
|
|
255
|
-
|
|
65
|
+
{
|
|
66
|
+
"begin": "(^\\s+)?(?=//)",
|
|
67
|
+
"beginCaptures": {
|
|
68
|
+
"1": {
|
|
69
|
+
"name": "punctuation.whitespace.comment.leading.cs"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"end": "(?=$)",
|
|
73
|
+
"name": "comment.line.langium"
|
|
256
74
|
}
|
|
257
|
-
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"include": "#regex-character-class"
|
|
261
|
-
}
|
|
262
|
-
]
|
|
75
|
+
]
|
|
263
76
|
},
|
|
264
|
-
{
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
]
|
|
268
|
-
},
|
|
269
|
-
"regex-character-class": {
|
|
270
|
-
"patterns": [
|
|
271
|
-
{
|
|
272
|
-
"name": "constant.other.character-class.regexp",
|
|
273
|
-
"match": "\\\\[wWsSdDtrnvf]|\\."
|
|
77
|
+
"string-character-escape": {
|
|
78
|
+
"name": "constant.character.escape.langium",
|
|
79
|
+
"match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
|
|
274
80
|
},
|
|
275
|
-
{
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
81
|
+
"regex": {
|
|
82
|
+
"patterns": [
|
|
83
|
+
{
|
|
84
|
+
"name": "string.regexp.ts",
|
|
85
|
+
"begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([a-z]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
|
|
86
|
+
"beginCaptures": {
|
|
87
|
+
"1": {
|
|
88
|
+
"name": "punctuation.definition.string.begin.ts"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"end": "(/)([a-z]*)",
|
|
92
|
+
"endCaptures": {
|
|
93
|
+
"1": {
|
|
94
|
+
"name": "punctuation.definition.string.end.ts"
|
|
95
|
+
},
|
|
96
|
+
"2": {
|
|
97
|
+
"name": "keyword.other.ts"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"patterns": [
|
|
101
|
+
{
|
|
102
|
+
"include": "#regexp"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "string.regexp.ts",
|
|
108
|
+
"begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([a-z]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
|
|
109
|
+
"beginCaptures": {
|
|
110
|
+
"0": {
|
|
111
|
+
"name": "punctuation.definition.string.begin.ts"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"end": "(/)([a-z]*)",
|
|
115
|
+
"endCaptures": {
|
|
116
|
+
"1": {
|
|
117
|
+
"name": "punctuation.definition.string.end.ts"
|
|
118
|
+
},
|
|
119
|
+
"2": {
|
|
120
|
+
"name": "keyword.other.ts"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"patterns": [
|
|
124
|
+
{
|
|
125
|
+
"include": "#regexp"
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
"regexp": {
|
|
132
|
+
"patterns": [
|
|
133
|
+
{
|
|
134
|
+
"name": "keyword.control.anchor.regexp",
|
|
135
|
+
"match": "\\\\[bB]|\\^|\\$"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
|
|
139
|
+
"captures": {
|
|
140
|
+
"0": {
|
|
141
|
+
"name": "keyword.other.back-reference.regexp"
|
|
142
|
+
},
|
|
143
|
+
"1": {
|
|
144
|
+
"name": "variable.other.regexp"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"name": "keyword.operator.quantifier.regexp",
|
|
150
|
+
"match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "keyword.operator.or.regexp",
|
|
154
|
+
"match": "\\|"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "meta.group.assertion.regexp",
|
|
158
|
+
"begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
|
|
159
|
+
"beginCaptures": {
|
|
160
|
+
"1": {
|
|
161
|
+
"name": "punctuation.definition.group.regexp"
|
|
162
|
+
},
|
|
163
|
+
"2": {
|
|
164
|
+
"name": "punctuation.definition.group.assertion.regexp"
|
|
165
|
+
},
|
|
166
|
+
"3": {
|
|
167
|
+
"name": "meta.assertion.look-ahead.regexp"
|
|
168
|
+
},
|
|
169
|
+
"4": {
|
|
170
|
+
"name": "meta.assertion.negative-look-ahead.regexp"
|
|
171
|
+
},
|
|
172
|
+
"5": {
|
|
173
|
+
"name": "meta.assertion.look-behind.regexp"
|
|
174
|
+
},
|
|
175
|
+
"6": {
|
|
176
|
+
"name": "meta.assertion.negative-look-behind.regexp"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"end": "(\\))",
|
|
180
|
+
"endCaptures": {
|
|
181
|
+
"1": {
|
|
182
|
+
"name": "punctuation.definition.group.regexp"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"patterns": [
|
|
186
|
+
{
|
|
187
|
+
"include": "#regexp"
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "meta.group.regexp",
|
|
193
|
+
"begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
|
|
194
|
+
"beginCaptures": {
|
|
195
|
+
"0": {
|
|
196
|
+
"name": "punctuation.definition.group.regexp"
|
|
197
|
+
},
|
|
198
|
+
"1": {
|
|
199
|
+
"name": "punctuation.definition.group.no-capture.regexp"
|
|
200
|
+
},
|
|
201
|
+
"2": {
|
|
202
|
+
"name": "variable.other.regexp"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"end": "\\)",
|
|
206
|
+
"endCaptures": {
|
|
207
|
+
"0": {
|
|
208
|
+
"name": "punctuation.definition.group.regexp"
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
"patterns": [
|
|
212
|
+
{
|
|
213
|
+
"include": "#regexp"
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"name": "constant.other.character-class.set.regexp",
|
|
219
|
+
"begin": "(\\[)(\\^)?",
|
|
220
|
+
"beginCaptures": {
|
|
221
|
+
"1": {
|
|
222
|
+
"name": "punctuation.definition.character-class.regexp"
|
|
223
|
+
},
|
|
224
|
+
"2": {
|
|
225
|
+
"name": "keyword.operator.negation.regexp"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"end": "(\\])",
|
|
229
|
+
"endCaptures": {
|
|
230
|
+
"1": {
|
|
231
|
+
"name": "punctuation.definition.character-class.regexp"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"patterns": [
|
|
235
|
+
{
|
|
236
|
+
"name": "constant.other.character-class.range.regexp",
|
|
237
|
+
"match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
|
|
238
|
+
"captures": {
|
|
239
|
+
"1": {
|
|
240
|
+
"name": "constant.character.numeric.regexp"
|
|
241
|
+
},
|
|
242
|
+
"2": {
|
|
243
|
+
"name": "constant.character.control.regexp"
|
|
244
|
+
},
|
|
245
|
+
"3": {
|
|
246
|
+
"name": "constant.character.escape.backslash.regexp"
|
|
247
|
+
},
|
|
248
|
+
"4": {
|
|
249
|
+
"name": "constant.character.numeric.regexp"
|
|
250
|
+
},
|
|
251
|
+
"5": {
|
|
252
|
+
"name": "constant.character.control.regexp"
|
|
253
|
+
},
|
|
254
|
+
"6": {
|
|
255
|
+
"name": "constant.character.escape.backslash.regexp"
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"include": "#regex-character-class"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"include": "#regex-character-class"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
"regex-character-class": {
|
|
270
|
+
"patterns": [
|
|
271
|
+
{
|
|
272
|
+
"name": "constant.other.character-class.regexp",
|
|
273
|
+
"match": "\\\\[wWsSdDtrnvf]|\\."
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"name": "constant.character.numeric.regexp",
|
|
277
|
+
"match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"name": "constant.character.control.regexp",
|
|
281
|
+
"match": "\\\\c[A-Z]"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "constant.character.escape.backslash.regexp",
|
|
285
|
+
"match": "\\\\."
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}
|
|
288
289
|
}
|
|
289
|
-
|
|
290
|
-
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* --------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) 2024 TypeFox and others.
|
|
3
|
+
* Licensed under the MIT License. See LICENSE in the package root for license information.
|
|
4
|
+
* ------------------------------------------------------------------------------------------ */
|
|
5
|
+
|
|
6
|
+
import { LanguageClientWrapper } from 'monaco-languageclient/lcwrapper';
|
|
7
|
+
import { MonacoVscodeApiWrapper } from 'monaco-languageclient/vscodeApiWrapper';
|
|
8
|
+
import * as vscode from 'vscode';
|
|
9
|
+
import type { ExampleAppConfig } from '../../common/client/utils.js';
|
|
10
|
+
import { setupLangiumClientExtended } from './config/extendedConfig.js';
|
|
11
|
+
|
|
12
|
+
export const runLangiumGrammarDsl = async () => {
|
|
13
|
+
try {
|
|
14
|
+
const appConfig: ExampleAppConfig = await setupLangiumClientExtended();
|
|
15
|
+
|
|
16
|
+
// perform global init
|
|
17
|
+
const apiWrapper = new MonacoVscodeApiWrapper(appConfig.vscodeApiConfig);
|
|
18
|
+
await apiWrapper.init();
|
|
19
|
+
|
|
20
|
+
// init language client
|
|
21
|
+
const lcWrapper = new LanguageClientWrapper(appConfig.languageClientConfig);
|
|
22
|
+
await lcWrapper.start();
|
|
23
|
+
|
|
24
|
+
await vscode.workspace.openTextDocument('/workspace/langium-types.langium');
|
|
25
|
+
await vscode.workspace.openTextDocument('/workspace/langium-grammar.langium');
|
|
26
|
+
await vscode.window.showTextDocument(vscode.Uri.file('/workspace/langium-grammar.langium'));
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.error(e);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
@@ -56,6 +56,11 @@ export const runStatemachineReact = async () => {
|
|
|
56
56
|
return () => clearTimeout(timer);
|
|
57
57
|
}, []);
|
|
58
58
|
|
|
59
|
+
const languageClientConfigs = {
|
|
60
|
+
configs: {
|
|
61
|
+
langium: appConfig.languageClientConfig
|
|
62
|
+
}
|
|
63
|
+
};
|
|
59
64
|
return (
|
|
60
65
|
<>
|
|
61
66
|
<div style={{ 'height': height }} >
|
|
@@ -63,6 +68,7 @@ export const runStatemachineReact = async () => {
|
|
|
63
68
|
style={{ 'height': '100%' }}
|
|
64
69
|
vscodeApiConfig={appConfig.vscodeApiConfig}
|
|
65
70
|
editorAppConfig={appConfig.editorAppConfig}
|
|
71
|
+
languageClientConfigs={languageClientConfigs}
|
|
66
72
|
onTextChanged={onTextChanged}
|
|
67
73
|
/>
|
|
68
74
|
<b>Debug:</b><br />{testState}
|
|
@@ -30,12 +30,18 @@ export const runPythonReact = async () => {
|
|
|
30
30
|
|
|
31
31
|
const root = ReactDOM.createRoot(document.getElementById('react-root')!);
|
|
32
32
|
|
|
33
|
+
const languageClientConfigs = {
|
|
34
|
+
configs: {
|
|
35
|
+
langium: appConfig.languageClientConfig
|
|
36
|
+
}
|
|
37
|
+
};
|
|
33
38
|
const App = () => {
|
|
34
39
|
return (
|
|
35
40
|
<div style={{ 'backgroundColor': '#1f1f1f' }} >
|
|
36
41
|
<MonacoEditorReactComp
|
|
37
42
|
vscodeApiConfig={appConfig.vscodeApiConfig}
|
|
38
43
|
editorAppConfig={appConfig.editorAppConfig}
|
|
44
|
+
languageClientConfigs={languageClientConfigs}
|
|
39
45
|
style={{ 'height': '100%' }}
|
|
40
46
|
onVscodeApiInitDone={onVscodeApiInitDone}
|
|
41
47
|
onError={(e) => {
|
package/vite.production.base.ts
CHANGED
|
@@ -10,7 +10,6 @@ export const buildBaseProductionConfig: () => UserConfig = () => {
|
|
|
10
10
|
rollupOptions: {
|
|
11
11
|
input: {
|
|
12
12
|
index: path.resolve(__dirname, 'index.html'),
|
|
13
|
-
langiumClassic: path.resolve(__dirname, 'ghp_langium_classic.html'),
|
|
14
13
|
langiumExtended: path.resolve(__dirname, 'ghp_langium_extended.html'),
|
|
15
14
|
statemachine: path.resolve(__dirname, 'ghp_statemachine.html'),
|
|
16
15
|
clangd: path.resolve(__dirname, 'ghp_clangd.html'),
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MessageTransports } from 'vscode-languageclient';
|
|
2
|
-
import type { ExampleAppConfig } from '../../../common/client/utils.js';
|
|
3
|
-
export declare const setupLangiumClientClassic: (params: {
|
|
4
|
-
worker: Worker;
|
|
5
|
-
messageTransports?: MessageTransports;
|
|
6
|
-
}) => ExampleAppConfig;
|
|
7
|
-
//# sourceMappingURL=classicConfig.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"classicConfig.d.ts","sourceRoot":"","sources":["../../../../src/langium/langium-dsl/config/classicConfig.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,eAAO,MAAM,yBAAyB,GAAI,QAAQ;IAC9C,MAAM,EAAE,MAAM,CAAA;IACd,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;CACzC,KAAG,gBAmEH,CAAC"}
|