-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathGcodeSyntaxHighlightingDef.YAML-tmLanguage
More file actions
64 lines (50 loc) · 1.3 KB
/
GcodeSyntaxHighlightingDef.YAML-tmLanguage
File metadata and controls
64 lines (50 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: G-code
scopeName: source.iso6983
fileTypes: [eia,nc,ngc,prg,mpf,gcode]
uuid: e6875107-21f9-449b-bbae-036db969b3d2
patterns:
- comment: g commands
name: support.variable
match: G\d+
- comment: m commands
name: support.constant
match: M\d+
- comment: comments
name: comment.line
match: \(.*\)
- comment: flow control operators
name: keyword.control
match: (IF|THEN|AND|OR|WHILE|GOTO)
- comment: comparison operators
name: keyword.operator
match: (GT|LT|GE|LE|EQ)
- comment: flow control operators - locations
name: markup.italic
match: (?<=GOTO|DO)\d+
- comment: functions
name: support.function
match: (ABS|ACOS|ASIN|ATAN|COS|LN|EXP|FIX|FUP|MOD|ROUND|SQRT|SIN|TAN)
- comment: variables
name: variable.other
match: (#\d+)
- comment: positions - alpha component
name: markup.bold
match: ([XYZABC]{1})(?=([\d\.-])*)
- comment: positions - numeric component
name: constant.numeric
match: (?<=[XYZABC])([\d\.-])*
- comment: arc positions
name: markup.italic
match: ([IJK])(?=([\d\.-])*)
- comment: feeds & speeds
name: variable.parameter
match: (?<= )[FS]([\d\.-])+
- comment: O & N numberes
name: support.function
match: ([ON]([\d\.-])+)
- comment: brackets
name: string.interpolated
match: (\[|\])
...