7
7
"name" : " comment.line.microcad"
8
8
},
9
9
{
10
- "match" : " \\ b(pub|part|use|fn|init|return|if|__builtin)\\ b" ,
10
+ "match" : " \\ b(pub|part|mod| use|fn|init|return|if|else|mat |__builtin)\\ b" ,
11
11
"name" : " keyword.control.microcad"
12
12
},
13
13
{
14
- "match" : " \\ +|-|\\ *|/|%|\\ =|\\ ==|\\ !=|\\ <|\\ >|\\ <=|\\ >=|\\ &&|\\ |\\ |" ,
15
- "name" : " keyword.operator.microcad"
16
- },
17
- {
18
- "match" : " \\ b(Integer|Scalar|String|Color|Length|Area|Volume|Angle|Weight|Bool)\\ b" ,
14
+ "match" : " \\ b(Integer|Scalar|String|Color|Length|Area|Volume|Angle|Weight|Density|Bool)\\ b" ,
19
15
"name" : " storage.type.microcad"
20
16
},
21
17
{
22
18
"match" : " \\ b([a-z_][a-zA-Z0-9_]*)\\ s*(?=\\ ()" ,
23
19
"name" : " entity.name.function.microcad"
24
20
},
25
21
{
26
- "match" : " \\ b([0-9]+(\\ .[0-9]+)?)(cm|mm|m|km)?\\ b" ,
22
+ "match" : " \\ +|-|\\ *|/| %|\\ =|\\ ==|\\ !=|\\ <|\\ >|\\ <=|\\ >=|\\ ||:" ,
23
+ "name" : " keyword.operator.microcad"
24
+ },
25
+ {
26
+ "match" : " \\ b(([0-9]+(\\ .[0-9]+)?)(%|m|cm|mm|µm|in|ft|yd|deg|°|grad|turn|rad|g|kg|lb|oz|m²|cm²|mm²|µm²|in²|ft²|yd²|m³|cm³|mm³|µm³|in³|ft³|yd³|ml|cl|l|µl)?|true|false)\\ b" ,
27
27
"name" : " constant.numeric.microcad"
28
28
},
29
29
{
30
30
"match" : " \\ b([a-z_][a-zA-Z0-9_]*)\\ b" ,
31
31
"name" : " variable.other.microcad"
32
32
},
33
+ {
34
+ "match" : " \" [^\" ]*\" " ,
35
+ "name" : " string.quoted.single.microcad"
36
+ },
33
37
{
34
38
"begin" : " \\ (" ,
35
39
"end" : " \\ )" ,
63
67
{
64
68
"include" : " #functions"
65
69
},
70
+ {
71
+ "include" : " #operators"
72
+ },
66
73
{
67
74
"include" : " #numbers"
68
75
},
73
80
"include" : " #types"
74
81
},
75
82
{
76
- "include" : " #operators "
83
+ "include" : " #strings "
77
84
}
78
85
]
79
86
},
82
89
"name" : " comment.line.microcad"
83
90
},
84
91
"keywords" : {
85
- "match" : " \\ b(pub|part|use|fn|init|assert| return|__builtin)\\ b" ,
92
+ "match" : " \\ b(pub|part|mod| use|fn|init|return|if|else|mat |__builtin)\\ b" ,
86
93
"name" : " keyword.control.microcad"
87
94
},
88
95
"functions" : {
89
96
"match" : " \\ b([a-z_][a-zA-Z0-9_]*)\\ s*(?=\\ ()" ,
90
97
"name" : " entity.name.function.microcad"
91
98
},
99
+ "operators" : {
100
+ "match" : " \\ +|-|\\ *|/| %|\\ =|\\ ==|\\ !=|\\ <|\\ >|\\ <=|\\ >=|\\ &&|\\ ||:" ,
101
+ "name" : " keyword.operator.microcad"
102
+ },
92
103
"numbers" : {
93
- "match" : " \\ b([0-9]+(\\ .[0-9]+)?)(cm|mm|m|km)? \\ b" ,
104
+ "match" : " \\ b(( [0-9]+(\\ .[0-9]+)?)(%|m| cm|mm|µm|in|ft|yd|deg|°|grad|turn|rad|g|kg|lb|oz|m²|cm²|mm²|µm²|in²|ft²|yd²|m³|cm³|mm³|µm³|in³|ft³|yd³|ml|cl|l|µl)?)|true|false \\ b" ,
94
105
"name" : " constant.numeric.microcad"
95
106
},
96
107
"variables" : {
97
108
"match" : " \\ b([a-z_][a-zA-Z0-9_]*)\\ b" ,
98
109
"name" : " variable.other.microcad"
99
110
},
100
- "operators" : {
101
- "match" : " \\ +|-|\\ *|/|%|\\ =|\\ ==|\\ !=|\\ <|\\ >|\\ <=|\\ >=|\\ &&|\\ |\\ |" ,
102
- "name" : " keyword.operator.microcad"
103
- },
104
111
"types" : {
105
- "match" : " \\ b(Integer|Scalar|String|Color|Length|Area|Volume|Angle|Weight|Bool)\\ b" ,
112
+ "match" : " \\ b(Integer|Scalar|String|Color|Length|Area|Volume|Angle|Weight|Density| Bool)\\ b" ,
106
113
"name" : " storage.type.microcad"
114
+ },
115
+ "strings" : {
116
+ "match" : " \" [^\" ]*\" " ,
117
+ "name" : " string.quoted.single.microcad"
107
118
}
108
119
}
109
120
}
0 commit comments