Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
569 lines (569 loc) · 17.5 KB
/
Copy pathpackage.json
File metadata and controls
569 lines (569 loc) · 17.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
{
"name": "xpp",
"displayName": "XPP",
"description": "Provides XPP \"ode, inc\" syntax and functionalities for VSCode",
"version": "0.4.3",
"publisher": "MuhammadMoustafa",
"author": {
"name": "Muhammad Moustafa",
"email": "muhammadmoustafa22@gmail.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/MuhammadMoustafa/XPP-ODE-Extension.git",
"home": "https://github.com/MuhammadMoustafa/XPP-ODE-Extension/blob/master/README.md"
},
"icon": "images/icon.png",
"main": "./out/src/extension.js",
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./",
"test": "mocha --require ts-node/register --ui tdd test/*.test.ts",
"package": "vsce package",
"publish:vscode": "vsce publish"
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^20.19.0",
"@types/vscode": "~1.82.0",
"@vscode/vsce": "^3.9.2",
"mocha": "^11.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.0"
},
"engines": {
"vscode": "^1.82.0"
},
"activationEvents": [
"onStartupFinished"
],
"keywords": [
"xpp",
"xppaut",
"auto",
"ode"
],
"categories": [
"Programming Languages"
],
"contributes": {
"languages": [
{
"id": "xpp",
"aliases": [
"XPP ODE",
"XPP",
"XPPAUT"
],
"extensions": [
".ode",
".inc"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "xpp",
"scopeName": "source.xpp",
"path": "./syntaxes/xpp.tmLanguage.json"
}
],
"commands": [
{
"command": "xpp.runOdeFile",
"title": "Run ODE File",
"category": "XPP-ODE",
"icon": "$(play)"
},
{
"command": "xpp.extractVariable",
"title": "XPP: Extract to Variable"
},
{
"command": "xpp.toggleComment",
"title": "Toggle Comment",
"category": "XPP-ODE"
}
],
"menus": {
"editor/title": [
{
"command": "xpp.runOdeFile",
"group": "navigation",
"when": "resourceLangId == xpp"
}
],
"editor/context": [
{
"when": "editorHasSelection && editorLangId == xpp",
"command": "xpp.extractVariable",
"group": "1_modification"
}
]
},
"configuration": {
"title": "XPP-ODE",
"properties": {
"xpp-ode.runCommand": {
"type": "string",
"default": "xppaut",
"markdownDescription": "Command that runs an `.ode` file; the file name is appended. It runs in the file's folder. Examples: `xppaut`, `/usr/local/bin/xppaut`, `C:\\\\xppall\\\\xppaut.exe`, `wsl xppaut`, `xppaut -xorfix`."
},
"xpp-ode.display": {
"type": "string",
"default": "127.0.0.1:0.0",
"markdownDescription": "Windows only. Value of the `DISPLAY` variable given to xppaut when it is not already set, so that the Cygwin build finds the X server (Xming, VcXsrv). Not used for `wsl ...` commands."
},
"xpp-ode.xServer": {
"type": "string",
"default": "",
"markdownDescription": "Windows only. Command line of an X server to start automatically before running xppaut when it is not already running, e.g. `\"C:\\\\Program Files (x86)\\\\Xming\\\\Xming.exe\" :0 -multiwindow -clipboard`. Leave empty to start the server yourself."
},
"xpp-ode.precedence.power": {
"type": "string",
"enum": [
"warning",
"information",
"hint",
"off"
],
"enumDescriptions": [
"Show as a warning",
"Show as an information message",
"Show only as a faint hint (not listed in the Problems panel)",
"Do not report this at all"
],
"default": "information",
"markdownDescription": "How to report the two `^` surprises: `^` groups to the left, so `2^3^2` is `(2^3)^2` = 64 and not `2^(3^2)` = 512; and unary minus binds more weakly than `^`, so `-2^2` is `-(2^2)` = -4 and not `(-2)^2` = 4. Nothing is wrong in either case — this is long-standing XPPAUT behaviour, and `exp(-x^2)` means exactly what it looks like — so these are reported as information, not warnings."
},
"xpp-ode.precedence.comparison": {
"type": "string",
"enum": [
"warning",
"information",
"hint",
"off"
],
"enumDescriptions": [
"Show as a warning",
"Show as an information message",
"Show only as a faint hint (not listed in the Problems panel)",
"Do not report this at all"
],
"default": "warning",
"markdownDescription": "How to report a comparison standing next to arithmetic. Comparisons have priority 7 and every arithmetic operator 4 or 6, so XPP evaluates the comparison first and applies the arithmetic to its 0 or 1 result: `2*3<4` is `2*(3<4)` = 2 and not 0, `3-1<2` is `3-(1<2)` = 2 and not 0, `1+2<3+4` is `1+(2<3)+4` = 6 and not 1, and `1/2<1` is `1/(2<1)`, a division by zero. A leading sign is the same rule: `-1<0` is `-(1<0)` = -0, which is **false**, and `-1>=0` is `-(1>=0)` = -1, which is **true**. All of these silently flip the branch an `if` takes, so they are reported as warnings. Bracket what you want compared: `(2*3)<4`."
},
"xpp-ode.precedence.logical": {
"type": "string",
"enum": [
"warning",
"information",
"hint",
"off"
],
"enumDescriptions": [
"Show as a warning",
"Show as an information message",
"Show only as a faint hint (not listed in the Problems panel)",
"Do not report this at all"
],
"default": "warning",
"markdownDescription": "How to report `&` or `|` standing next to arithmetic. `&` has priority 6 like `*` and `/`, and `|` priority 4 like `+` and `-`, so XPP does not finish the arithmetic first: `1+1&1` is `1+(1&1)` = 2 and not 1, `a&b*c` is `(a&b)*c`, and `a|b-c` is `(a|b)-c`. Only groupings that differ from the usual reading are reported; `a*b&c` and `a+b|c` mean what they look like. Bracket the operands: `(a+b)&c`."
},
"xpp-ode.debounceDelay": {
"type": "number",
"default": 300,
"minimum": 0,
"description": "Delay in milliseconds before updating diagnostics after text changes."
},
"xpp-ode.variables": {
"type": "object",
"default": {},
"markdownDescription": "Colours and styles for specific variables, parameters or functions, independent of the theme. Keys are XPP names (case-insensitive) or a category: `@states`, `@parameters`, `@fixed`, `@functions`, `@aux`, `@wiener`, `@markov`, `@tables`, `@options`, `@builtins`, `@keywords`. Values are a hex colour (`\"#ff8800\"`) or a style object with any of `color`, `backgroundColor`, `fontWeight`, `fontStyle`, `textDecoration`, `opacity`, `borderColor`, `borderStyle`, `borderWidth`, `borderRadius`, plus optional `light` / `dark` objects with theme-specific overrides, and a `description` shown when hovering the name. Put the setting in a workspace `.vscode/settings.json`, or put the same content under `\"variables\"` in a `.xppsettings.json` file in a folder, to style every `.ode`/`.inc` file in that folder.",
"additionalProperties": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Hex colour: #rgb, #rrggbb or #rrggbbaa"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Text colour: #rgb, #rrggbb or #rrggbbaa"
},
"backgroundColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Background colour: #rgb, #rrggbb or #rrggbbaa"
},
"fontStyle": {
"type": "string",
"enum": [
"normal",
"italic"
]
},
"fontWeight": {
"type": "string",
"enum": [
"normal",
"bold"
]
},
"textDecoration": {
"type": "string",
"description": "CSS text-decoration, e.g. \"underline\", \"line-through\" or \"underline wavy\""
},
"opacity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"light": {
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Text colour: #rgb, #rrggbb or #rrggbbaa"
},
"backgroundColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Background colour: #rgb, #rrggbb or #rrggbbaa"
},
"fontStyle": {
"type": "string",
"enum": [
"normal",
"italic"
]
},
"fontWeight": {
"type": "string",
"enum": [
"normal",
"bold"
]
},
"textDecoration": {
"type": "string",
"description": "CSS text-decoration, e.g. \"underline\", \"line-through\" or \"underline wavy\""
},
"opacity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"borderColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Box colour: #rgb, #rrggbb or #rrggbbaa. Alone it gives a 1px solid box."
},
"borderStyle": {
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"double"
]
},
"borderWidth": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box line width, e.g. \"1px\""
},
"borderRadius": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box corner radius, e.g. \"3px\""
}
}
},
"dark": {
"type": "object",
"additionalProperties": false,
"properties": {
"color": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Text colour: #rgb, #rrggbb or #rrggbbaa"
},
"backgroundColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Background colour: #rgb, #rrggbb or #rrggbbaa"
},
"fontStyle": {
"type": "string",
"enum": [
"normal",
"italic"
]
},
"fontWeight": {
"type": "string",
"enum": [
"normal",
"bold"
]
},
"textDecoration": {
"type": "string",
"description": "CSS text-decoration, e.g. \"underline\", \"line-through\" or \"underline wavy\""
},
"opacity": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"borderColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Box colour: #rgb, #rrggbb or #rrggbbaa. Alone it gives a 1px solid box."
},
"borderStyle": {
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"double"
]
},
"borderWidth": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box line width, e.g. \"1px\""
},
"borderRadius": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box corner radius, e.g. \"3px\""
}
}
},
"borderColor": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
"description": "Box colour: #rgb, #rrggbb or #rrggbbaa. Alone it gives a 1px solid box."
},
"borderStyle": {
"type": "string",
"enum": [
"solid",
"dashed",
"dotted",
"double"
]
},
"borderWidth": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box line width, e.g. \"1px\""
},
"borderRadius": {
"type": [
"string",
"number"
],
"pattern": "^\\d+(\\.\\d+)?(px|em|rem|%)?$",
"description": "Box corner radius, e.g. \"3px\""
},
"description": {
"type": "string",
"minLength": 1,
"description": "Text shown when hovering the name, after the descriptions written in its comments"
}
}
}
]
},
"properties": {
"@states": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "State variables (x'=, dx/dt=, x(t+1)=, solv) everywhere they are used"
},
"@parameters": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "par / number parameters and !name= derived parameters"
},
"@fixed": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "Fixed variables (name=expression)"
},
"@functions": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "User functions f(x)="
},
"@aux": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "aux quantities"
},
"@wiener": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "wiener variables"
},
"@markov": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "markov variables"
},
"@tables": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "table and special names"
},
"@options": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "Option names on @ lines (dt, total, xp, ...)"
},
"@builtins": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "Builtin functions and constants (sin, heav, t, pi, ...)"
},
"@keywords": {
"anyOf": [
{
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
},
{
"type": "object"
}
],
"description": "Declaration keywords (par, init, aux, done, ...)"
}
},
"propertyNames": {
"pattern": "^(@[a-z]+|[A-Za-z0-9_*]+|[A-Za-z_][A-Za-z0-9_]*\\[[0-9 ,.-]+\\])$"
}
},
"xpp-ode.identifierColors": {
"type": "object",
"default": {},
"markdownDescription": "Deprecated name of `#xpp-ode.variables#`; still read, but `#xpp-ode.variables#` wins for the same key.",
"markdownDeprecationMessage": "Renamed to `#xpp-ode.variables#`: move these entries there."
}
}
},
"jsonValidation": [
{
"fileMatch": ".xppsettings.json",
"url": "./schemas/xppsettings.schema.json"
},
{
"fileMatch": ".xppcolors.json",
"url": "./schemas/xppcolors.schema.json"
}
],
"keybindings": [
{
"command": "xpp.toggleComment",
"key": "ctrl+/",
"when": "editorTextFocus && editorLangId == xpp"
}
]
}
}