Skip to content

Commit 04c7895

Browse files
committed
Merge branch 'release-0.7.2'
2 parents 5b72bf4 + 7e6507d commit 04c7895

File tree

9 files changed

+332
-432
lines changed

9 files changed

+332
-432
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"parser": "@typescript-eslint/parser",
1616
"parserOptions": {
17-
"ecmaVersion": 2019,
17+
"ecmaVersion": 2021,
1818
"sourceType": "module",
1919
"ecmaFeatures": {
2020
"impliedStrict": true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.eslintcache
2+
.vscode-test/**
23
*.vsix
34
dist
45
images/*.ai

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All changes to G-Code Language Extension will be documented here.
44

5+
## v0.7.2 [#](https://github.com/appliedengdesign/vscode-gcode-syntax/releases/tag/v0.7.2)
6+
7+
### Fixes
8+
9+
- Fixed highlighting syntax for `T` inside of other words [#40](https://github.com/appliedengdesign/vscode-gcode-syntax/issues/40)
10+
11+
### Other
12+
13+
- Updated dependencies [#38](https://github.com/appliedengdesign/vscode-gcode-syntax/pull/38)
14+
- Refactored some Regex to be more concise
15+
- Updated VSCode engine to `^1.68.0`
16+
- Update Typescript build to ES2021
17+
- Updated README
18+
519
## v0.7.1 [#](https://github.com/appliedengdesign/vscode-gcode-syntax/releases/tag/v0.7.1)
620

721
### New Features

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ This extension adds language syntax for CNC G-Code, code snippets, and colorizat
8383
| .gcode | .gp | .hnc | .knc | .lib | .m | .min | .mpf |
8484
| .mpr | .msb | .nc | .ncc | .ncd | .ncf | .ncg | .nci |
8585
| .ncp | .ngc | .out | .pim | .pit | .plt | .ply | .prg |
86-
| .pu1 | .rol | .sbp | .spf | .ssb | .sub | .tap | .xpi |
86+
| .pu1 | .rol | .S | .sbp | .spf | .ssb | .sub | .tap |
87+
| .xpi | | | | | | | |
8788
```
8889

8990
If you would like another file extension supported by this extension, please [open an issue](https://github.com/appliedemgdesign/vscode-gcode-syntax/issues).
@@ -140,7 +141,7 @@ Visit our [projects page](https://github.com/appliedengdesign/vscode-gcode-synta
140141

141142
## Changelog
142143

143-
Latest Version: v0.7.1
144+
Latest Version: v0.7.2
144145

145146
Please refer to our [CHANGELOG](https://github.com/appliedengdesign/vscode-gcode-syntax/blob/master/CHANGELOG.md) doc.
146147

package-lock.json

Lines changed: 255 additions & 394 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "G-Code Syntax",
44
"shortName": "G-Code",
55
"description": "Turn VSCode into a fully capable G-Code editor, including language support & more.",
6-
"version": "0.7.1",
6+
"version": "0.7.2",
77
"license": "MIT",
88
"publisher": "appliedengdesign",
99
"author": {
@@ -12,7 +12,7 @@
1212
},
1313
"copyright": "Copyright (c) 2022 Applied Eng. & Design / Mike Centola",
1414
"engines": {
15-
"vscode": "^1.67.0"
15+
"vscode": "^1.68.0"
1616
},
1717
"categories": [
1818
"Programming Languages",
@@ -467,27 +467,27 @@
467467
"@types/chai": "^4.3.1",
468468
"@types/glob": "^7.2.0",
469469
"@types/mocha": "^9.1.1",
470-
"@types/node": "^17.0.34",
471-
"@types/vscode": "^1.67.0",
472-
"@typescript-eslint/eslint-plugin": "^5.24.0",
473-
"@typescript-eslint/parser": "^5.24.0",
470+
"@types/node": "^18.0.0",
471+
"@types/vscode": "^1.68.1",
472+
"@typescript-eslint/eslint-plugin": "^5.30.0",
473+
"@typescript-eslint/parser": "^5.30.0",
474474
"chai": "^4.3.6",
475-
"eslint": "^8.15.0",
475+
"eslint": "^8.18.0",
476476
"eslint-config-prettier": "^8.5.0",
477477
"eslint-plugin-import": "^2.26.0",
478-
"eslint-plugin-prettier": "^4.0.0",
478+
"eslint-plugin-prettier": "^4.2.1",
479479
"fork-ts-checker-webpack-plugin": "^7.2.11",
480480
"glob": "^8.0.3",
481481
"mocha": "^10.0.0",
482-
"prettier": "^2.6.2",
482+
"prettier": "^2.7.1",
483483
"shx": "^0.3.4",
484-
"ts-loader": "^9.3.0",
485-
"ts-node": "^10.7.0",
486-
"typescript": "^4.6.4",
484+
"ts-loader": "^9.3.1",
485+
"ts-node": "^10.8.1",
486+
"typescript": "^4.7.4",
487487
"vscode-test": "^1.6.1",
488-
"webpack": "^5.72.1",
488+
"webpack": "^5.73.0",
489489
"webpack-bundle-analyzer": "^4.5.0",
490-
"webpack-cli": "^4.9.2"
490+
"webpack-cli": "^4.10.0"
491491
},
492492
"dependencies": {
493493
"@appliedengdesign/gcode-reference": "^0.0.3"

syntaxes/gcode.tmLanguage.json

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616
"include": "#bracket-expression"
1717
},
1818
{
19-
"include": "#keywords"
19+
"include": "#control"
20+
},
21+
{
22+
"include": "#gcodes"
23+
},
24+
{
25+
"include": "#mcodes"
2026
},
2127
{
2228
"include": "#operators"
@@ -54,12 +60,28 @@
5460
}
5561
]
5662
},
57-
"keywords": {
63+
"control": {
5864
"patterns": [
5965
{
60-
"match": "(GOTO(?>\\d+))|(IF)|(EQ)|(NE)|(LT)|(GT)|(LE)|(GE)|(DO ?(?>\\d+))|(WHILE)|(WH)|(END ?(?>\\d+))|(AND)|(OR)|(XOR)|(THEN)|(ELSE)|(ENDIF)",
66+
"match": "(GOTO\\s?\\d*)",
67+
"name": "keyword.control.gcode"
68+
},
69+
{
70+
"match": "(EQ|NE|LT|GT|LE|GE|AND|OR|XOR)",
6171
"name": "keyword.control.gcode"
6272
},
73+
{
74+
"match": "(DO\\s?\\d*|WHILE|WH|END|IF|THEN|ELSE|ENDIF)",
75+
"name": "keyword.control.gcode"
76+
},
77+
{
78+
"match": "([\\%])",
79+
"name": "string.gcode"
80+
}
81+
]
82+
},
83+
"gcodes": {
84+
"patterns": [
6385
{
6486
"match": "[gG](1)?5[4-9](.1)?\\s?(P[0-9]{1,3})?",
6587
"name": "constant.numeric.gcode"
@@ -75,29 +97,29 @@
7597
{
7698
"match": "[gG][0-9]{1,3}(\\.[0-9])?",
7799
"name": "markup.bold.gcode"
78-
},
100+
}
101+
]
102+
},
103+
"mcodes": {
104+
"patterns": [
79105
{
80106
"match": "[mM][0-9]{1,3}",
81107
"name": "keyword.operator.quantifier.regexp.gcode"
82-
},
83-
{
84-
"match": "([\\%])",
85-
"name": "string.gcode"
86108
}
87109
]
88110
},
89111
"operators": {
90112
"patterns": [
91113
{
92-
"match": "(SIN)|(COS)|(TAN)|(ASIN)|(ACOS)|(ATAN)|(FIX)|(FUP)|(LN)|(ROUND)|(SQRT)",
114+
"match": "(SIN|COS|TAN|ASIN|ACOS|ATAN|FIX|FUP|LN|ROUND|SQRT)",
93115
"name": "support.constant.math.gcode"
94116
},
95117
{
96-
"match": "(FIX)|(FUP)|(ROUND)|(ABS)|(MOD)",
118+
"match": "(FIX|FUP|ROUND|ABS|MOD)",
97119
"name": "support.constant.math.gcode"
98120
},
99121
{
100-
"match": "(\\+)|(\\*)|(\\/)|(\\*\\*)",
122+
"match": "(\\+|\\*|\\/|\\*\\*)",
101123
"name": "support.constant.math.gcode"
102124
},
103125
{
@@ -157,15 +179,15 @@
157179
"tools": {
158180
"patterns": [
159181
{
160-
"match": "([dD])\\s?(\\d*\\.?\\d*|(?=[#\\[]))",
182+
"match": "([dD])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))",
161183
"name": "constant.character.gcode"
162184
},
163185
{
164-
"match": "([hH])\\s?(\\d*\\.?\\d*|(?=[#\\[]))",
186+
"match": "([hH])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))",
165187
"name": "constant.character.gcode"
166188
},
167189
{
168-
"match": "([tT])\\s?(\\d*\\.?\\d*|(?=[#\\[]))",
190+
"match": "([tT])\\s?(\\d+(\\.\\d*)?|(?=[#\\[]))",
169191
"name": "constant.character.gcode"
170192
}
171193
]
@@ -219,4 +241,4 @@
219241
]
220242
}
221243
}
222-
}
244+
}

tsconfig.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
23
"compilerOptions": {
34
"esModuleInterop": true,
45
"forceConsistentCasingInFileNames": true,
56
"incremental": true,
67
"isolatedModules": true,
78
"lib": [
8-
"es2020"
9+
"ES2021"
910
],
10-
"module": "esnext",
11+
"module": "CommonJS",
1112
"moduleResolution": "node",
1213
"noFallthroughCasesInSwitch": true,
1314
"noImplicitReturns": true,
@@ -19,7 +20,7 @@
1920
"skipLibCheck": true,
2021
"sourceMap": true,
2122
"strict": true,
22-
"target": "es2019",
23+
"target": "ES2021",
2324
"useDefineForClassFields": true
2425
},
2526
"include": [
@@ -28,6 +29,6 @@
2829
],
2930
"exclude": [
3031
"node_modules",
31-
"samplenc",
32+
"samplenc"
3233
]
3334
}

tsconfig.tests.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"lib": [
5-
"es2020"
5+
"ES2021"
66
],
7-
"module": "commonjs",
7+
"module": "CommonJS",
88
"outDir": "out",
99
"tsBuildInfoFile": "tsconfig.tests.tsbuildinfo"
1010
}

0 commit comments

Comments
 (0)