@duet3d/monacotokens 3.6.0 → 3.7.0-alpha.1
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/dist/monaco-gcode.d.ts +1 -1
- package/dist/monaco-gcode.js +7 -5
- package/package.json +3 -3
package/dist/monaco-gcode.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import * as monaco from "monaco-editor/esm/vs/editor/editor.api";
|
|
1
|
+
import type * as monaco from "monaco-editor/esm/vs/editor/editor.api";
|
|
2
2
|
export declare const gcodeFDMLanguage: monaco.languages.IMonarchLanguage;
|
|
3
3
|
export declare const gcodeCNCLanguage: monaco.languages.IMonarchLanguage;
|
package/dist/monaco-gcode.js
CHANGED
|
@@ -19,8 +19,9 @@ function generateMonarchLanguage(fdmMode) {
|
|
|
19
19
|
tokenizer: {
|
|
20
20
|
root: [
|
|
21
21
|
// G/M/T-codes
|
|
22
|
-
[/[gG][
|
|
22
|
+
[/[gG][0123](?=\D)/, "keyword", fdmMode ? "normalGcode" : "moveGcode"],
|
|
23
23
|
[/[gGmM]\d+(\.\d+)?/, "keyword", "normalGcode"],
|
|
24
|
+
[/[tT](?=\{)/, "keyword", "normalGcodeWithT"],
|
|
24
25
|
[/[tT]-?\d+/, "keyword", "normalGcodeWithT"],
|
|
25
26
|
// meta keywords
|
|
26
27
|
[/[a-z_$][\w$]*/, {
|
|
@@ -44,7 +45,8 @@ function generateMonarchLanguage(fdmMode) {
|
|
|
44
45
|
// next G/M/T-code
|
|
45
46
|
[/[gG][0123](?=\D)/, "keyword", "moveGcode"],
|
|
46
47
|
[/[gGmM]\d+(\.\d*)?/, "keyword", "normalGcode"],
|
|
47
|
-
[/[tT]/, "keyword", "normalGcodeWithT"],
|
|
48
|
+
[/[tT](?=\{)/, "keyword", "normalGcodeWithT"],
|
|
49
|
+
[/[tT]-?\d+/, "keyword", "normalGcodeWithT"],
|
|
48
50
|
// parameter letters
|
|
49
51
|
[/'?[a-zA-Z]/, "keyword"],
|
|
50
52
|
// expressions
|
|
@@ -52,7 +54,7 @@ function generateMonarchLanguage(fdmMode) {
|
|
|
52
54
|
// enclosed comments
|
|
53
55
|
[/\(.*\)/, "comment"],
|
|
54
56
|
// parameter expressions
|
|
55
|
-
[/{/, "expression", "@expression"],
|
|
57
|
+
[/T?{/, "expression", "@expression"],
|
|
56
58
|
// include defaults
|
|
57
59
|
{ include: "root" }
|
|
58
60
|
],
|
|
@@ -76,9 +78,9 @@ function generateMonarchLanguage(fdmMode) {
|
|
|
76
78
|
],
|
|
77
79
|
expression: [
|
|
78
80
|
// variables
|
|
79
|
-
[/(global|param|var)\.[a-zA-
|
|
81
|
+
[/(global|param|var)\.[a-zA-Z_$][\w$]*/, "variable.name"],
|
|
80
82
|
// object model properties
|
|
81
|
-
[
|
|
83
|
+
[/\w+(\.\w+)*/, "variable"],
|
|
82
84
|
// consts and functions
|
|
83
85
|
[/[a-z]\w*/, {
|
|
84
86
|
cases: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duet3d/monacotokens",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0-alpha.1",
|
|
4
4
|
"description": "TypeScript library that holds syntax highlighting files for the Monaco editor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
},
|
|
20
20
|
"homepage": "https://github.com/Duet3D/MonacoTokens#readme",
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"typescript": "^5.
|
|
22
|
+
"typescript": "^5.9.3"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"/dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"monaco-editor": "^0.
|
|
28
|
+
"monaco-editor": "^0.55.1"
|
|
29
29
|
}
|
|
30
30
|
}
|