@duet3d/monacotokens 3.6.0 → 3.6.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.js +7 -5
- package/package.json +1 -1
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: {
|