@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.
@@ -19,8 +19,9 @@ function generateMonarchLanguage(fdmMode) {
19
19
  tokenizer: {
20
20
  root: [
21
21
  // G/M/T-codes
22
- [/[gG][01](?=\D)/, "keyword", fdmMode ? "normalGcode" : "moveGcode"],
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-Z]\w*/, "variable.name"],
81
+ [/(global|param|var)\.[a-zA-Z_$][\w$]*/, "variable.name"],
80
82
  // object model properties
81
- [/(\w+\.(\w+\.?)*|\.\w+(\.\w+)*)/, "variable"],
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.6.0",
3
+ "version": "3.6.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",