Changeset View
Changeset View
Standalone View
Standalone View
data/syntax/openscad.xml
- This file was added.
1 | <?xml version="1.0" encoding="UTF-8"?> | ||||
---|---|---|---|---|---|
2 | <!DOCTYPE language SYSTEM "language.dtd"> | ||||
3 | | ||||
4 | <language name="OpenSCAD" version="1" kateversion="5.0" section="Other" extensions="*.scad" mimetype="text/x-openscad-src" priority="1" casesensitive="1" author="Julian Stirling (julian@julianstirling.co.uk)" license="MIT"> | ||||
5 | <highlighting> | ||||
6 | | ||||
7 | <list name="preprocessor"> | ||||
8 | <item>include</item> | ||||
9 | <item>import</item> | ||||
10 | <item>use</item> | ||||
11 | </list> | ||||
12 | <list name="keywords"> | ||||
13 | <item>echo</item> | ||||
14 | <item>for</item> | ||||
15 | <item>intersection_for</item> | ||||
16 | <item>if</item> | ||||
17 | <item>else</item> | ||||
18 | <item>module</item> | ||||
19 | <item>function</item> | ||||
20 | </list> | ||||
21 | | ||||
22 | <list name="2D"> | ||||
23 | <item>circle</item> | ||||
24 | <item>square</item> | ||||
25 | <item>polygon</item> | ||||
26 | <item>text</item> | ||||
27 | </list> | ||||
28 | | ||||
29 | <list name="3D"> | ||||
30 | <item>sphere</item> | ||||
31 | <item>cube</item> | ||||
32 | <item>cylinder</item> | ||||
33 | <item>polyhedron</item> | ||||
34 | </list> | ||||
35 | | ||||
36 | | ||||
37 | <list name="transformations"> | ||||
38 | <item>translate</item> | ||||
39 | <item>rotate</item> | ||||
40 | <item>scale</item> | ||||
41 | <item>resize</item> | ||||
42 | <item>mirror</item> | ||||
43 | <item>multmatrix</item> | ||||
44 | <item>color</item> | ||||
45 | <item>color</item> | ||||
46 | <item>offset</item> | ||||
47 | <item>hull</item> | ||||
48 | <item>minkowski</item> | ||||
49 | </list> | ||||
50 | | ||||
51 | <list name="boolean"> | ||||
52 | <item>union</item> | ||||
53 | <item>difference</item> | ||||
54 | <item>intersection</item> | ||||
55 | </list> | ||||
56 | | ||||
57 | <list name="mathematical"> | ||||
58 | <item>abs</item> | ||||
59 | <item>sign</item> | ||||
60 | <item>sin</item> | ||||
61 | <item>cos</item> | ||||
62 | <item>tan</item> | ||||
63 | <item>acos</item> | ||||
64 | <item>asin</item> | ||||
65 | <item>atan</item> | ||||
66 | <item>atan2</item> | ||||
67 | <item>floor</item> | ||||
68 | <item>round</item> | ||||
69 | <item>ceil</item> | ||||
70 | <item>ln</item> | ||||
71 | <item>len</item> | ||||
72 | <item>let</item> | ||||
73 | <item>log</item> | ||||
74 | <item>pow</item> | ||||
75 | <item>sqrt</item> | ||||
76 | <item>exp</item> | ||||
77 | <item>rands</item> | ||||
78 | <item>min</item> | ||||
79 | <item>max</item> | ||||
80 | </list> | ||||
81 | | ||||
82 | <list name="functions"> | ||||
83 | <item>concat</item> | ||||
84 | <item>lookup</item> | ||||
85 | <item>str</item> | ||||
86 | <item>chr</item> | ||||
87 | <item>search</item> | ||||
88 | <item>version</item> | ||||
89 | <item>version_num</item> | ||||
90 | <item>norm</item> | ||||
91 | <item>cross</item> | ||||
92 | <item>parent_module</item> | ||||
93 | </list> | ||||
94 | | ||||
95 | <list name="list_comp"> | ||||
96 | <item>Generate</item> | ||||
97 | <item>Conditions</item> | ||||
98 | <item>Assignments</item> | ||||
99 | </list> | ||||
100 | | ||||
101 | <list name="other"> | ||||
102 | <item>linear_extrude</item> | ||||
103 | <item>rotate_extrude</item> | ||||
104 | <item>surface</item> | ||||
105 | <item>projection</item> | ||||
106 | <item>render</item> | ||||
107 | <item>children</item> | ||||
108 | </list> | ||||
109 | <contexts> | ||||
110 | <context attribute="Normal Text" lineEndContext="#stay" name="Normal"> | ||||
111 | <DetectSpaces /> | ||||
112 | <RegExpr attribute="Error" context="AfterDollar" String="\$[a-zA-Z]*" insensitive="true" firstNonSpace="false" lookAhead="true"/> | ||||
113 | <keyword attribute="Preprocessor" context="#stay" String="preprocessor"/> | ||||
114 | <keyword attribute="Keywords" context="#stay" String="keywords"/> | ||||
115 | <keyword attribute="Two Dim" context="#stay" String="2D"/> | ||||
116 | <keyword attribute="Three Dim" context="#stay" String="3D"/> | ||||
117 | <keyword attribute="Transformation" context="#stay" String="transformations"/> | ||||
118 | <keyword attribute="Boolean" context="#stay" String="boolean"/> | ||||
119 | <keyword attribute="Mathematical" context="#stay" String="mathematical"/> | ||||
120 | <keyword attribute="Functions" context="#stay" String="functions"/> | ||||
121 | <keyword attribute="List Comprehensions" context="#stay" String="list_comp"/> | ||||
122 | <keyword attribute="Other" context="#stay" String="other"/> | ||||
123 | <Detect2Chars attribute="Comment" context="OneLineCom" char="/" char1="/"/> | ||||
124 | <Detect2Chars attribute="Comment" context="MultLineCom" char="/" char1="*" beginRegion="Comment"/> | ||||
125 | </context> | ||||
126 | <context attribute="Error" lineEndContext="#pop" name="AfterDollar"> | ||||
127 | <RegExpr attribute="SpecialVar" context="SpecialVar" String="\$(fa|fs|fn|t|vpr|vpt|vpd|children)" insensitive="true" firstNonSpace="false"/> | ||||
128 | <RegExpr attribute="Normal Text" context="#pop" String="[^a-zA-Z0-9\$]" insensitive="true" firstNonSpace="false"/> | ||||
129 | </context> | ||||
130 | <context attribute="SpecialVar" lineEndContext="#pop" name="SpecialVar"> | ||||
131 | <RegExpr attribute="Error" context="#pop#pop" String="[^\s=\*\+\-/\);]+" insensitive="true" firstNonSpace="false"/> | ||||
132 | <RegExpr attribute="Normal Text" context="#pop#pop" String="\s*[=\*\+\-/\);]" insensitive="true" firstNonSpace="false"/> | ||||
133 | </context> | ||||
134 | <context attribute="Comment" lineEndContext="#pop" name="OneLineCom"> | ||||
135 | </context> | ||||
136 | <context attribute="Comment" lineEndContext="#stay" name="MultLineCom"> | ||||
137 | <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/> | ||||
138 | </context> | ||||
139 | </contexts> | ||||
140 | <itemDatas> | ||||
141 | <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> | ||||
142 | <itemData name="Comment" defStyleNum="dsComment"/> | ||||
143 | <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> | ||||
144 | <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false"/> | ||||
145 | <itemData name="Keywords" defStyleNum="dsFunction" spellChecking="false"/> | ||||
146 | <itemData name="Two Dim" defStyleNum="dsKeyword" spellChecking="false"/> | ||||
147 | <itemData name="Three Dim" defStyleNum="dsKeyword" spellChecking="false"/> | ||||
148 | <itemData name="Transformation" defStyleNum="dsFunction" spellChecking="false"/> | ||||
149 | <itemData name="Boolean" defStyleNum="dsFunction" spellChecking="false"/> | ||||
150 | <itemData name="Mathematical" defStyleNum="dsBuiltIn" spellChecking="false"/> | ||||
151 | <itemData name="Functions" defStyleNum="dsExtension" spellChecking="false"/> | ||||
152 | <itemData name="List Comprehensions" defStyleNum="dsFunction" spellChecking="false"/> | ||||
153 | <itemData name="Other" defStyleNum="dsExtension" spellChecking="false"/> | ||||
154 | <itemData name="SpecialVar" defStyleNum="dsAttribute" spellChecking="false"/> | ||||
155 | </itemDatas> | ||||
156 | </highlighting> | ||||
157 | <general> | ||||
158 | <comments> | ||||
159 | <comment name="singleLine" start="//" /> | ||||
160 | <comment name="multiLine" start="/*" end="*/" /> | ||||
161 | </comments> | ||||
162 | <keywords casesensitive="1" additionalDeliminator="'"" /> | ||||
163 | </general> | ||||
164 | </language> |