-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOpenSCAD.JSON-tmLanguage
More file actions
89 lines (71 loc) · 2.26 KB
/
Copy pathOpenSCAD.JSON-tmLanguage
File metadata and controls
89 lines (71 loc) · 2.26 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// [PackageDev] target_format: plist, ext: tmLanguage
{ "name": "OpenSCAD",
"scopeName": "source.scad",
"fileTypes": ["scad"],
"uuid": "837e26cc-44e6-49bb-9011-9d145939c930",
"patterns": [
{ "name": "comment.line.scad", //single line comments
"begin": "\\/\\/",
"end": "\\\r"
},
{ "name": "comment.block.scad", //comments blocked in /* */
"begin": "\\/\\*",
"end": "\\*\\/"
},
{ "name": "meta.function.scad", //modules declaration and parameters
"begin": "^module ", //I think forces start of string
"end": "\\)",
"beginCaptures": {
"0": { "name": "keyword.other.scad" }
},
"patterns": [
{ "include": "$self" },
{ "name": "entity.name.function.scad",
"match": "\\w"
},
{ "name": "variable.parameter.scad",
"match": ".+\\="
},
{ "name": "constant.numeric.scad",
"match": "([0-9])"
}
]
},
{ "match": "\\b(abs|acos|asin|atan|atan2|ceil|cos|exp|floor|ln|log|lookup|max|min|pow|rands|round|sign|sin|sqrt|tan|str)\\b",
"name": "keyword.scad",
"comment": "builting openscad keywords"
},
{ "match": "\\b(union|difference|intersection|render|intersection_for)\\b",
"name": "keyword.scad",
"comment": "builting openscad booleans"
},
{ "match": "\\b(scale|rotate|translate|mirror|multmatrix|color|minkowski)\\b",
"name": "keyword.scad",
"comment": "builting openscad transforms"
},
{ "match": "\\b(cube|sphere|cylinder|polyhedron|surface)\\b",
"name": "support.function.scad",
"comment": "builting openscad solids"
},
{ "match": "\\b(square|circle|polygon|import_dxf)\\b",
"name": "support.function.scad",
"comment": "builting openscad 2d"
},
{ "match": "\\b()\\b",
"name": "keyword.operator.scad",
"comment": "builting openscad fancy varieables"
},
{ "match": "\\b(if|for)\\b",
"name": "keyword.control.scad",
"comment": "builting openscad fancy variables"
},
{ "match": "\\b\\w+ ?\\(",
"name": "entity.name.function.scad",
"comment": "calls to modules"
},
{ "match": "\\+|-|<|\\*|/|%|>|>=|<=|==|!=|&&|\\|\\||!|\\?:", //donet forget -
"name": "keyword.operator.scad",
"comment": "builting openscad operator"
}
]
}