Skip to content

Commit e688f83

Browse files
committed
Update syntax defs
1 parent f742eba commit e688f83

File tree

2 files changed

+110
-54
lines changed

2 files changed

+110
-54
lines changed

AutoLISP.YAML-tmLanguage

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ repository:
5353
- include: '#vlr'
5454
- include: '#vlax'
5555
- include: '#vla'
56-
- include: '#require'
5756
- include: '#call'
5857

5958
function:
@@ -257,34 +256,47 @@ repository:
257256
- name: support.function.property.menu-toolbar.vla.autolisp
258257
match: (?i)(?<=^|['\s()])vla-get-(?:MenuFileName|Menus|Submenu|Toolbars|Index|Caption|Label|Macro|NameNoMnemonic|OnMenuBar|ShortcutMenu|Parent|DockStatus|Height|Width|Type|TagString|Flyout)(?=$|[\s()])
259258

260-
require:
261-
patterns:
262-
- name: support.variable.require.autolisp
263-
match: (?i)(?<=^|['\s()])(?:\*features\*)(?=$|[\s()])
264-
- name: support.function.require.autolisp
265-
match: (?i)(?<=^|['\s()])(?:require|provide)(?=$|[\s()])
266-
267259
call:
268260
patterns:
261+
- name: support.variable.require.call.autolisp
262+
match: (?i)(?<=^|['\s()])ll-(?:features)(?=$|[\s()])
263+
- name: support.function.require.call.autolisp
264+
match: (?i)(?<=^|['\s()])ll-(?:featuerep|provide|require)(?=$|[\s()])
265+
- name: support.function.type.call.autolisp
266+
match: (?i)(?<=^|['\s()])ll-(?:typep|anyp)(?=$|[\s()])
267+
- name: support.constant.boolean.call.autolisp
268+
match: (?i)(?<=^|['\s()])ll-(?:true|false)(?=$|[\s()])
269+
- name: support.function.boolean.call.autolisp
270+
match: (?i)(?<=^|['\s()])ll-(?:booleanp)(?=$|[\s()])
271+
- name: support.constant.void.call.autolisp
272+
match: (?i)(?<=^|['\s()])ll-(?:void)(?=$|[\s()])
273+
- name: support.function.void.call.autolisp
274+
match: (?i)(?<=^|['\s()])ll-(?:voidp)(?=$|[\s()])
269275
- name: support.function.symbol.call.autolisp
270-
match: (?i)(?<=^|['\s()])cl-(?:symbolp|objectp|booleanp|voidp|typep|symbol-value|symbol-name|void)(?=$|[\s()])
271-
- name: support.function.function.call.autolisp
272-
match: (?i)(?<=^|['\s()])cl-(?:functionp)(?=$|[\s()])
276+
match: (?i)(?<=^|['\s()])ll-(?:symbolp|symbol-value|symbol-name)(?=$|[\s()])
277+
- name: support.function.def.call.autolisp
278+
match: (?i)(?<=^|['\s()])ll-(?:functionp)(?=$|[\s()])
273279
- name: support.function.string.call.autolisp
274-
match: (?i)(?<=^|['\s()])cl-(?:substring|list->string|string-(?:>list|elt|position)|string-(?:left-|right-)?trim)(?=$|[\s()])
280+
match: (?i)(?<=^|['\s()])ll-(?:substring|list->string|string-(?:>list|elt|position)|string-(?:left-|right-)?trim)(?=$|[\s()])
275281
- name: support.function.stringx.call.autolisp
276-
match: (?i)(?<=^|['\s()])cl-(?:string(?:=|/=|<|<=|>|>=)|string-(?:not-)?(?:equal|lessp|greaterp))(?=$|[\s()])
282+
match: (?i)(?<=^|['\s()])ll-(?:string(?:=|/=|<|<=|>|>=)|string-(?:not-)?(?:equal|lessp|greaterp))(?=$|[\s()])
283+
- name: support.function.random.call.autolisp
284+
match: (?i)(?<=^|['\s()])ll-(?:rand|srand|random|random-seed)(?=$|[\s()])
285+
- name: support.function.number.call.autolisp
286+
match: (?i)(?<=^|['\s()])ll-(?:integerp|realp|natnump|plusp|oddp|evenp|mod|quot)(?=$|[\s()])
287+
- name: support.constant.numlim.call.autolisp
288+
match: (?i)(?<=^|['\s()])ll-(?:most-(?:positive|negative)-fixnum|float-(?:negative-)?epsilon|(?:negative-)?inf|nan)(?=$|[\s()])
289+
- name: support.function.numlim.call.autolisp
290+
match: (?i)(?<=^|['\s()])ll-(?:infp|nanp)(?=$|[\s()])
277291
- name: support.function.math.call.autolisp
278-
match: (?i)(?<=^|['\s()])cl-(?:integerp|realp|plusp|oddp|evenp|fract|round|floor|ceiling|truncate|quot|mod|lcm|tan|asin|acos|rand|srand|random|random-seed)(?=$|[\s()])
292+
match: (?i)(?<=^|['\s()])ll-(?:signum|round|floor|ceiling|truncate|fract|lcm|tan|asin|acos|radians->degrees|degrees->radians)(?=$|[\s()])
279293
- name: support.function.mathx.call.autolisp
280-
match: (?i)(?<=^|['\s()])(?:1/|signum|sqr|exp10|exp2|log10|log2|cot|sec|csc|acot|asec|acsc|versin|vercos|coversin|covercos|haversin|havercos|hacoversin|hacovercos|exsec|excsc|sinh|cosh|tanh|coth|sech|csch|asinh|acosh|atanh|acoth|asech|acsch|degrees->radians|radians->degrees|gons->radians|radians->gons|gons->degrees|degrees->gons|dms->degrees|degrees->dms)(?=$|[\s()])
281-
#- name: support.constant.mathx.call.autolisp
282-
# match: (?i)(?<=^|['\s()])(?:-pi|2pi|pi/2)(?=$|[\s()])
294+
match: (?i)(?<=^|['\s()])ll-(?:1/|sqr|exp10|exp2|log10|log2|cot|sec|csc|acot|asec|acsc|versin|vercos|coversin|covercos|haversin|havercos|hacoversin|hacovercos|exsec|excsc|sinh|cosh|tanh|coth|sech|csch|asinh|acosh|atanh|acoth|asech|acsch|gons->radians|radians->gons|gons->degrees|degrees->gons|dms->degrees|degrees->dms)(?=$|[\s()])
283295
- name: support.function.list.call.autolisp
284-
match: (?i)(?<=^|['\s()])cl-(?:consp|endp|make-list|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|rest|nthcdr|firstn|butlast|butlastn|lastn|sublist|subseq|split(?:-if(?:-not)?|-at(?:-first|-last)?|-all)?|partition(?:-all)?|separate|list-length|revappend|count(?:-if(?:-not)?)?|some|every|foldr|foldl|reduce(?:-from-end|-with-init)?|member-if(?:-not)?|position(?:-if(?:-not)?)?|containsp|mismatch|subst(?:-if(?:-not)?|-nth|-first|-last)|substree|insert|remove(?:-if(?:-not)?|-nth|-first|-last)?|remove(?:-adjacent)?-duplicates)(?=$|[\s()])
296+
match: (?i)(?<=^|['\s()])ll-(?:consp|endp|make-list|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|rest|nthcdr|firstn|butlast|butlastn|lastn|sublist|subseq|split(?:-if(?:-not)?|-at(?:-first|-last)?|-all)?|partition(?:-all)?|separate|list-length|revappend|count(?:-if(?:-not)?)?|some|every|foldr|foldl|reduce(?:-from-end|-with-init)?|member-if(?:-not)?|position(?:-if(?:-not)?)?|containsp|mismatch|subst(?:-if(?:-not)?|-nth|-first|-last)|substree|insert|remove(?:-if(?:-not)?|-nth|-first|-last)?|remove(?:-adjacent)?-duplicates|tailp|ldiff)(?=$|[\s()])
285297
- name: support.function.listx.call.autolisp
286-
match: (?i)(?<=^|['\s()])(?:dotted-pair-p|dotted-list-p|last-cdr|maplist|maptree|flatten|tailp|ldiff)(?=$|[\s()])
298+
match: (?i)(?<=^|['\s()])ll-(?:dotted-pair-p|dotted-list-p|last-cdr|maplist|maptree|flatten)(?=$|[\s()])
287299
- name: support.function.listset.call.autolisp
288-
match: (?i)(?<=^|['\s()])cl-(?:subsetp|adjoin|union|intersection|set-difference|set-exclusive-or)(?=$|[\s()])
300+
match: (?i)(?<=^|['\s()])ll-(?:subsetp|adjoin|union|intersection|set-difference|set-exclusive-or)(?=$|[\s()])
289301
- name: support.function.activex.call.autolisp
290-
match: (?i)(?<=^|['\s()])(?:vla-object-p|variantp|safearrayp)(?=$|[\s()])
302+
match: (?i)(?<=^|['\s()])ll-(?:vla-object-p|variantp|safearrayp)(?=$|[\s()])

AutoLISP.tmLanguage

Lines changed: 77 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -51,61 +51,127 @@
5151
<array>
5252
<dict>
5353
<key>match</key>
54-
<string>(?i)(?&lt;=^|['\s()])cl-(?:symbolp|objectp|booleanp|voidp|typep|symbol-value|symbol-name|void)(?=$|[\s()])</string>
54+
<string>(?i)(?&lt;=^|['\s()])ll-(?:features)(?=$|[\s()])</string>
55+
<key>name</key>
56+
<string>support.variable.require.call.autolisp</string>
57+
</dict>
58+
<dict>
59+
<key>match</key>
60+
<string>(?i)(?&lt;=^|['\s()])ll-(?:featuerep|provide|require)(?=$|[\s()])</string>
61+
<key>name</key>
62+
<string>support.function.require.call.autolisp</string>
63+
</dict>
64+
<dict>
65+
<key>match</key>
66+
<string>(?i)(?&lt;=^|['\s()])ll-(?:typep|anyp)(?=$|[\s()])</string>
67+
<key>name</key>
68+
<string>support.function.type.call.autolisp</string>
69+
</dict>
70+
<dict>
71+
<key>match</key>
72+
<string>(?i)(?&lt;=^|['\s()])ll-(?:true|false)(?=$|[\s()])</string>
73+
<key>name</key>
74+
<string>support.constant.boolean.call.autolisp</string>
75+
</dict>
76+
<dict>
77+
<key>match</key>
78+
<string>(?i)(?&lt;=^|['\s()])ll-(?:booleanp)(?=$|[\s()])</string>
79+
<key>name</key>
80+
<string>support.function.boolean.call.autolisp</string>
81+
</dict>
82+
<dict>
83+
<key>match</key>
84+
<string>(?i)(?&lt;=^|['\s()])ll-(?:void)(?=$|[\s()])</string>
85+
<key>name</key>
86+
<string>support.constant.void.call.autolisp</string>
87+
</dict>
88+
<dict>
89+
<key>match</key>
90+
<string>(?i)(?&lt;=^|['\s()])ll-(?:voidp)(?=$|[\s()])</string>
91+
<key>name</key>
92+
<string>support.function.void.call.autolisp</string>
93+
</dict>
94+
<dict>
95+
<key>match</key>
96+
<string>(?i)(?&lt;=^|['\s()])ll-(?:symbolp|symbol-value|symbol-name)(?=$|[\s()])</string>
5597
<key>name</key>
5698
<string>support.function.symbol.call.autolisp</string>
5799
</dict>
58100
<dict>
59101
<key>match</key>
60-
<string>(?i)(?&lt;=^|['\s()])cl-(?:functionp)(?=$|[\s()])</string>
102+
<string>(?i)(?&lt;=^|['\s()])ll-(?:functionp)(?=$|[\s()])</string>
61103
<key>name</key>
62-
<string>support.function.function.call.autolisp</string>
104+
<string>support.function.def.call.autolisp</string>
63105
</dict>
64106
<dict>
65107
<key>match</key>
66-
<string>(?i)(?&lt;=^|['\s()])cl-(?:substring|list-&gt;string|string-(?:&gt;list|elt|position)|string-(?:left-|right-)?trim)(?=$|[\s()])</string>
108+
<string>(?i)(?&lt;=^|['\s()])ll-(?:substring|list-&gt;string|string-(?:&gt;list|elt|position)|string-(?:left-|right-)?trim)(?=$|[\s()])</string>
67109
<key>name</key>
68110
<string>support.function.string.call.autolisp</string>
69111
</dict>
70112
<dict>
71113
<key>match</key>
72-
<string>(?i)(?&lt;=^|['\s()])cl-(?:string(?:=|/=|&lt;|&lt;=|&gt;|&gt;=)|string-(?:not-)?(?:equal|lessp|greaterp))(?=$|[\s()])</string>
114+
<string>(?i)(?&lt;=^|['\s()])ll-(?:string(?:=|/=|&lt;|&lt;=|&gt;|&gt;=)|string-(?:not-)?(?:equal|lessp|greaterp))(?=$|[\s()])</string>
73115
<key>name</key>
74116
<string>support.function.stringx.call.autolisp</string>
75117
</dict>
76118
<dict>
77119
<key>match</key>
78-
<string>(?i)(?&lt;=^|['\s()])cl-(?:integerp|realp|plusp|oddp|evenp|fract|round|floor|ceiling|truncate|quot|mod|lcm|tan|asin|acos|rand|srand|random|random-seed)(?=$|[\s()])</string>
120+
<string>(?i)(?&lt;=^|['\s()])ll-(?:rand|srand|random|random-seed)(?=$|[\s()])</string>
121+
<key>name</key>
122+
<string>support.function.random.call.autolisp</string>
123+
</dict>
124+
<dict>
125+
<key>match</key>
126+
<string>(?i)(?&lt;=^|['\s()])ll-(?:integerp|realp|natnump|plusp|oddp|evenp|mod|quot)(?=$|[\s()])</string>
127+
<key>name</key>
128+
<string>support.function.number.call.autolisp</string>
129+
</dict>
130+
<dict>
131+
<key>match</key>
132+
<string>(?i)(?&lt;=^|['\s()])ll-(?:most-(?:positive|negative)-fixnum|float-(?:negative-)?epsilon|(?:negative-)?inf|nan)(?=$|[\s()])</string>
133+
<key>name</key>
134+
<string>support.constant.numlim.call.autolisp</string>
135+
</dict>
136+
<dict>
137+
<key>match</key>
138+
<string>(?i)(?&lt;=^|['\s()])ll-(?:infp|nanp)(?=$|[\s()])</string>
139+
<key>name</key>
140+
<string>support.function.numlim.call.autolisp</string>
141+
</dict>
142+
<dict>
143+
<key>match</key>
144+
<string>(?i)(?&lt;=^|['\s()])ll-(?:signum|round|floor|ceiling|truncate|fract|lcm|tan|asin|acos|radians-&gt;degrees|degrees-&gt;radians)(?=$|[\s()])</string>
79145
<key>name</key>
80146
<string>support.function.math.call.autolisp</string>
81147
</dict>
82148
<dict>
83149
<key>match</key>
84-
<string>(?i)(?&lt;=^|['\s()])(?:1/|signum|sqr|exp10|exp2|log10|log2|cot|sec|csc|acot|asec|acsc|versin|vercos|coversin|covercos|haversin|havercos|hacoversin|hacovercos|exsec|excsc|sinh|cosh|tanh|coth|sech|csch|asinh|acosh|atanh|acoth|asech|acsch|degrees-&gt;radians|radians-&gt;degrees|gons-&gt;radians|radians-&gt;gons|gons-&gt;degrees|degrees-&gt;gons|dms-&gt;degrees|degrees-&gt;dms)(?=$|[\s()])</string>
150+
<string>(?i)(?&lt;=^|['\s()])ll-(?:1/|sqr|exp10|exp2|log10|log2|cot|sec|csc|acot|asec|acsc|versin|vercos|coversin|covercos|haversin|havercos|hacoversin|hacovercos|exsec|excsc|sinh|cosh|tanh|coth|sech|csch|asinh|acosh|atanh|acoth|asech|acsch|gons-&gt;radians|radians-&gt;gons|gons-&gt;degrees|degrees-&gt;gons|dms-&gt;degrees|degrees-&gt;dms)(?=$|[\s()])</string>
85151
<key>name</key>
86152
<string>support.function.mathx.call.autolisp</string>
87153
</dict>
88154
<dict>
89155
<key>match</key>
90-
<string>(?i)(?&lt;=^|['\s()])cl-(?:consp|endp|make-list|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|rest|nthcdr|firstn|butlast|butlastn|lastn|sublist|subseq|split(?:-if(?:-not)?|-at(?:-first|-last)?|-all)?|partition(?:-all)?|separate|list-length|revappend|count(?:-if(?:-not)?)?|some|every|foldr|foldl|reduce(?:-from-end|-with-init)?|member-if(?:-not)?|position(?:-if(?:-not)?)?|containsp|mismatch|subst(?:-if(?:-not)?|-nth|-first|-last)|substree|insert|remove(?:-if(?:-not)?|-nth|-first|-last)?|remove(?:-adjacent)?-duplicates)(?=$|[\s()])</string>
156+
<string>(?i)(?&lt;=^|['\s()])ll-(?:consp|endp|make-list|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|rest|nthcdr|firstn|butlast|butlastn|lastn|sublist|subseq|split(?:-if(?:-not)?|-at(?:-first|-last)?|-all)?|partition(?:-all)?|separate|list-length|revappend|count(?:-if(?:-not)?)?|some|every|foldr|foldl|reduce(?:-from-end|-with-init)?|member-if(?:-not)?|position(?:-if(?:-not)?)?|containsp|mismatch|subst(?:-if(?:-not)?|-nth|-first|-last)|substree|insert|remove(?:-if(?:-not)?|-nth|-first|-last)?|remove(?:-adjacent)?-duplicates|tailp|ldiff)(?=$|[\s()])</string>
91157
<key>name</key>
92158
<string>support.function.list.call.autolisp</string>
93159
</dict>
94160
<dict>
95161
<key>match</key>
96-
<string>(?i)(?&lt;=^|['\s()])(?:dotted-pair-p|dotted-list-p|last-cdr|maplist|maptree|flatten|tailp|ldiff)(?=$|[\s()])</string>
162+
<string>(?i)(?&lt;=^|['\s()])ll-(?:dotted-pair-p|dotted-list-p|last-cdr|maplist|maptree|flatten)(?=$|[\s()])</string>
97163
<key>name</key>
98164
<string>support.function.listx.call.autolisp</string>
99165
</dict>
100166
<dict>
101167
<key>match</key>
102-
<string>(?i)(?&lt;=^|['\s()])cl-(?:subsetp|adjoin|union|intersection|set-difference|set-exclusive-or)(?=$|[\s()])</string>
168+
<string>(?i)(?&lt;=^|['\s()])ll-(?:subsetp|adjoin|union|intersection|set-difference|set-exclusive-or)(?=$|[\s()])</string>
103169
<key>name</key>
104170
<string>support.function.listset.call.autolisp</string>
105171
</dict>
106172
<dict>
107173
<key>match</key>
108-
<string>(?i)(?&lt;=^|['\s()])(?:vla-object-p|variantp|safearrayp)(?=$|[\s()])</string>
174+
<string>(?i)(?&lt;=^|['\s()])ll-(?:vla-object-p|variantp|safearrayp)(?=$|[\s()])</string>
109175
<key>name</key>
110176
<string>support.function.activex.call.autolisp</string>
111177
</dict>
@@ -178,24 +244,6 @@
178244
</dict>
179245
</array>
180246
</dict>
181-
<key>require</key>
182-
<dict>
183-
<key>patterns</key>
184-
<array>
185-
<dict>
186-
<key>match</key>
187-
<string>(?i)(?&lt;=^|['\s()])(?:\*features\*)(?=$|[\s()])</string>
188-
<key>name</key>
189-
<string>support.variable.require.autolisp</string>
190-
</dict>
191-
<dict>
192-
<key>match</key>
193-
<string>(?i)(?&lt;=^|['\s()])(?:require|provide)(?=$|[\s()])</string>
194-
<key>name</key>
195-
<string>support.function.require.autolisp</string>
196-
</dict>
197-
</array>
198-
</dict>
199247
<key>string</key>
200248
<dict>
201249
<key>patterns</key>
@@ -263,10 +311,6 @@
263311
<key>include</key>
264312
<string>#vla</string>
265313
</dict>
266-
<dict>
267-
<key>include</key>
268-
<string>#require</string>
269-
</dict>
270314
<dict>
271315
<key>include</key>
272316
<string>#call</string>

0 commit comments

Comments
 (0)