Skip to content

Commit ad3bfa3

Browse files
committed
support task, target, pacakge, rule, special rule completion
1 parent f84ed4b commit ad3bfa3

File tree

23 files changed

+377
-271
lines changed

23 files changed

+377
-271
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ members = [
66

77
[workspace.dependencies]
88
# local
9-
xmake_code_analysis = { path = "crates/xmake_code_analysis", version = "0.2.0" }
10-
xmake_ls = { path = "crates/xmake_ls", version = "0.2.0" }
9+
xmake_code_analysis = { path = "crates/xmake_code_analysis", version = "0.3.0" }
10+
xmake_ls = { path = "crates/xmake_ls", version = "0.3.0" }
1111
xmake_formatter = { path = "crates/xmake_formatter", version = "0.2.0" }
1212
xmake_wrapper = { path = "crates/xmake_wrapper", version = "0.1.0" }
1313

crates/xmake_code_analysis/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "xmake_code_analysis"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2024"
55
authors = ["CppCXY"]
66
description = "A library for analyzing xmake code."

crates/xmake_code_analysis/resources/std/xmake/configuration_option.lua

Lines changed: 22 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
--- set_default(false)
1212
--- set_showmenu(true)
1313
--- ```
14-
---
14+
---@scope option
1515
---@param name string Option name
1616
---@return nil
1717
function option(name) end
@@ -24,221 +24,183 @@ function option(name) end
2424
---@return nil
2525
function option_end() end
2626

27-
---
28-
---**Scoped: option**
2927
---
3028
---Adding options depends
3129
---
3230
---[Open in browser](https://xmake.io/api/description/configuration-option#add_deps)
33-
---
31+
---@scope option
3432
---@param name string Depending option name
3533
---@param ... string Depending option names
3634
---@return nil
3735
function add_deps(name, ...) end
3836

39-
---
40-
---**Scoped: option**
4137
---
4238
---Adding options defines
4339
---
4440
---[Open in browser](https://xmake.io/api/description/configuration-option#add_defines)
45-
---
41+
---@scope option
4642
---@param name string Macro define name
4743
---@param ... string Macro define names
4844
---@return nil
4945
function add_defines(name, ...) end
5046

51-
---
52-
---**Scoped: option**
5347
---
5448
---Execute this script before option detection
5549
---
5650
---[Open in browser](https://xmake.io/api/description/configuration-option#before_check)
57-
---
51+
---@scope option
5852
---@param func fun(option: Option): nil Function to run before check
5953
---@return nil
6054
function before_check(func) end
6155

62-
---
63-
---**Scoped: option**
6456
---
6557
---Custom Option Detection Script
6658
---
6759
---[Open in browser](https://xmake.io/api/description/configuration-option#on_check)
68-
---
60+
---@scope option
6961
---@param func fun(option: Option): nil Function to run for custom check
7062
---@return nil
7163
function on_check(func) end
7264

73-
---
74-
---**Scoped: option**
7565
---
7666
---Execute this script after option detection
7767
---
7868
---[Open in browser](https://xmake.io/api/description/configuration-option#after_check)
79-
---
69+
---@scope option
8070
---@param func fun(option: Option): nil Function to run after check
8171
---@return nil
8272
function after_check(func) end
8373

84-
---
85-
---**Scoped: option**
8674
---
8775
---Setting the list of option values
8876
---
8977
---[Open in browser](https://xmake.io/api/description/configuration-option#set_values)
90-
---
78+
---@scope option
9179
---@param value string Option value
9280
---@param ... string Option values
9381
---@return nil
9482
function set_values(value, ...) end
9583

96-
---
97-
---**Scoped: option**
9884
---
9985
---Setting options defaults
10086
---
10187
---[Open in browser](https://xmake.io/api/description/configuration-option#set_default)
102-
---
88+
---@scope option
10389
---@param default boolean|string Default value
10490
---@return nil
10591
function set_default(default) end
10692

107-
---
108-
---**Scoped: option**
10993
---
11094
---Set whether to enable menu display
11195
---
11296
---[Open in browser](https://xmake.io/api/description/configuration-option#set_showmenu)
113-
---
97+
---@scope option
11498
---@param enabled boolean Whether to enable menu
11599
---@return nil
116100
function set_showmenu(enabled) end
117101

118-
---
119-
---**Scoped: option**
120102
---
121103
---Setting option categories, only for menu display
122104
---
123105
---[Open in browser](https://xmake.io/api/description/configuration-option#set_category)
124-
---
106+
---@scope option
125107
---@param name string Menu category name
126108
---@return nil
127109
function set_category(name) end
128110

129-
---
130-
---**Scoped: option**
131111
---
132112
---Setting menu display description
133113
---
134114
---[Open in browser](https://xmake.io/api/description/configuration-option#set_description)
135-
---
115+
---@scope option
136116
---@param description string Menu description
137117
---@param ... string Multiple line descriptions
138118
---@return nil
139119
function set_description(description, ...) end
140120

141-
---
142-
---**Scoped: option**
143121
---
144122
---Add Link Library Detection
145123
---
146124
---[Open in browser](https://xmake.io/api/description/configuration-option#add_links)
147-
---
125+
---@scope option
148126
---@param link string Link library name
149127
---@param ... string Link library names
150128
---@return nil
151129
function add_links(link, ...) end
152130

153-
---
154-
---**Scoped: option**
155131
---
156132
---Adding the search directory needed for link library detection
157133
---
158134
---[Open in browser](https://xmake.io/api/description/configuration-option#add_linkdirs)
159-
---
135+
---@scope option
160136
---@param dir string Search link library directory
161137
---@param ... string Search link library directories
162138
---@return nil
163139
function add_linkdirs(dir, ...) end
164140

165-
---
166-
---**Scoped: option**
167141
---
168142
---Adding a load search directory for a dynamic library at runtime
169143
---
170144
---[Open in browser](https://xmake.io/api/description/configuration-option#add_rpathdirs)
171-
---
145+
---@scope option
172146
---@param dir string Load search directory for dynamic library
173147
---@param ... string Load search directories for dynamic library
174148
---@return nil
175149
function add_rpathdirs(dir, ...) end
176150

177-
---
178-
---**Scoped: option**
179151
---
180152
---Add c header file detection
181153
---
182154
---[Open in browser](https://xmake.io/api/description/configuration-option#add_cincludes)
183-
---
155+
---@scope option
184156
---@param name string File name
185157
---@param ... string File names
186158
---@return nil
187159
function add_cincludes(name, ...) end
188160

189-
---
190-
---**Scoped: option**
191161
---
192162
---Add c++ header file detection
193163
---
194164
---[Open in browser](https://xmake.io/api/description/configuration-option#add_cxxincludes)
195-
---
165+
---@scope option
196166
---@param name string File name
197167
---@param ... string File names
198168
---@return nil
199169
function add_cxxincludes(name, ...) end
200170

201-
---
202-
---**Scoped: option**
203171
---
204172
---Add c type detection
205173
---
206174
---[Open in browser](https://xmake.io/api/description/configuration-option#add_ctypes)
207-
---
175+
---@scope option
208176
---@param type string C type
209177
---@param ... string C types
210178
---@return nil
211179
function add_ctypes(type, ...) end
212180

213-
---
214-
---**Scoped: option**
215181
---
216182
---Adding c++ type detection
217183
---
218184
---[Open in browser](https://xmake.io/api/description/configuration-option#add_cxxtypes)
219-
---
185+
---@scope option
220186
---@param type string C++ type
221187
---@param ... string C++ types
222188
---@return nil
223189
function add_cxxtypes(type, ...) end
224190

225-
---
226-
---**Scoped: option**
227191
---
228192
---TODO: add option type
229193
---
230194
---Add c code fragment detection
231195
---
232196
---[Open in browser](https://xmake.io/api/description/configuration-option#add_csnippets)
233-
---
197+
---@scope option
234198
---@param name string Snippet name
235199
---@param snippet string C snippet
236200
---@param option? any Option
237201
---@return nil
238202
function add_csnippets(name, snippet, option) end
239203

240-
---
241-
---**Scoped: option**
242204
---
243205
---TODO: add option type
244206
---
@@ -249,32 +211,28 @@ function add_csnippets(name, snippet, option) end
249211
--- ```lua
250212
--- add_cxxsnippets("int add(int a,int b){return a+b;}")
251213
--- ```
252-
---
214+
---@scope option
253215
---@param name string Snippet name
254216
---@param snippet string C snippet
255217
---@param option? any Option
256218
---@return nil
257219
function add_cxxsnippets(name, snippet, option) end
258220

259-
---
260-
---**Scoped: option**
261221
---
262222
---Add c library function detection
263223
---
264224
---[Open in browser](https://xmake.io/api/description/configuration-option#add_cfuncs)
265-
---
225+
---@scope option
266226
---@param name string C function name
267227
---@param ... string C function names
268228
---@return nil
269229
function add_cfuncs(name, ...) end
270230

271-
---
272-
---**Scoped: option**
273231
---
274232
---Add c++ library function detection
275233
---
276234
---[Open in browser](https://xmake.io/api/description/configuration-option#add_cxxfuncs)
277-
---
235+
---@scope option
278236
---@param name string C++ function name
279237
---@param ... string C++ function names
280238
---@return nil

0 commit comments

Comments
 (0)