Skip to content

Commit 2a2f261

Browse files
committed
Fixed syntax for Issues #1,#2
1 parent 5e3b993 commit 2a2f261

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

syntaxes/gcode.tmLanguage.json

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
{
66
"include": "#comments"
77
},
8-
{
9-
"include": "#keywords"
10-
},
118
{
129
"include": "#speedsfeeds"
1310
},
@@ -25,6 +22,12 @@
2522
},
2623
{
2724
"include": "#macrovars"
25+
},
26+
{
27+
"include": "#keywords"
28+
},
29+
{
30+
"include": "#operators"
2831
}
2932
],
3033
"repository": {
@@ -60,16 +63,28 @@
6063
"name": "string.gcode"
6164
},
6265
{
63-
"match": "(GOTO)|(IF)|(EQ)|(NE)|(LT)|(GT)",
66+
"match": "(GOTO)|(IF)|(EQ)|(NE)|(LT)|(GT)|(LE)|(GE)|(DO)|(WHILE)|(END)|(AND)|(OR)|(XOR)",
6467
"name": "keyword.control.gcode"
6568
}
6669
]
6770
},
6871
"operators": {
6972
"patterns": [
7073
{
71-
"match": "(SIN)|(COS)|(TAN)",
74+
"match": "(SIN)|(COS)|(TAN)|(ASIN)|(ACOS)|(ATAN)|(LN)|(SQRT)|(MOD)|(EXP)",
7275
"name": "support.constant.math.gcode"
76+
},
77+
{
78+
"match": "(FIX)|(FUP)|(ROUND)|(ABS)",
79+
"name": "support.constant.math.gcode"
80+
},
81+
{
82+
"match": "(\\+)|(\\*)|(\\/)|(\\*\\*)",
83+
"name": "support.constant.math.gcode"
84+
},
85+
{
86+
"match": "(\\-)",
87+
"name": "invalid.gcode"
7388
}
7489
]
7590
},

0 commit comments

Comments
 (0)