@@ -11,7 +11,7 @@ import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
11
11
import {GithubLinkNote } from ' /snippets/GithubLinkNote.mdx' ;
12
12
import {Attribute } from ' /snippets/Attribute.mdx' ;
13
13
14
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L30-L156 " />
14
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L30-L163 " />
15
15
16
16
### Inherits from
17
17
[ HasValue] ( /api-reference/core/HasValue ) , [ Expression] ( /api-reference/core/Expression ) , [ HasName] ( /api-reference/core/HasName ) , [ Editable] ( /api-reference/core/Editable )
@@ -95,7 +95,7 @@ import {Attribute} from '/snippets/Attribute.mdx';
95
95
<HorizontalDivider />
96
96
### <span className = " text-primary" >add_keyword</span >
97
97
Converts an unnamed argument to a named argument by adding a keyword.
98
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L105-L121 " />
98
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L112-L128 " />
99
99
100
100
<ParameterWrapper >
101
101
<Parameter
@@ -112,15 +112,15 @@ Converts an unnamed argument to a named argument by adding a keyword.
112
112
113
113
### <span className = " text-primary" >ancestors</span >
114
114
Find all ancestors of the node of the given type. Does not return itself
115
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1088-L1096 " />
115
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1101-L1109 " />
116
116
117
117
118
118
<Return return_type = { <><span >list[</span > <a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >]</span ></> } description = " " />
119
119
120
120
121
121
### <span className = " text-primary" >edit</span >
122
122
Replace the source of this ` Editable ` with ` new_src ` .
123
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L632-L660 " />
123
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L637-L665 " />
124
124
125
125
<ParameterWrapper >
126
126
<Parameter
@@ -155,7 +155,7 @@ Replace the source of this `Editable` with `new_src`.
155
155
156
156
### <span className = " text-primary" >find</span >
157
157
Find and return matching nodes or substrings within an Editable instance.
158
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L482-L499 " />
158
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L487-L504 " />
159
159
160
160
<ParameterWrapper >
161
161
<Parameter
@@ -178,7 +178,7 @@ Find and return matching nodes or substrings within an Editable instance.
178
178
179
179
### <span className = " text-primary" >find_string_literals</span >
180
180
Returns a list of string literals within this node's source that match any of the given
181
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L394-L408 " />
181
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L398-L412 " />
182
182
183
183
<ParameterWrapper >
184
184
<Parameter
@@ -196,12 +196,12 @@ Returns a list of string literals within this node's source that match any of th
196
196
</ParameterWrapper >
197
197
198
198
199
- <Return return_type = { <><span >list[</span > <a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >]</span ></> } description = " A list of Editable objects representing the matching string literals." />
199
+ <Return return_type = { <><span >list[</span > <a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >[</ span > < a href = " /api-reference/core/Argument " style = { {fontWeight: " inherit " , fontSize: " inherit " } } >Argument</ a > < span >] ]</span ></> } description = " A list of Editable objects representing the matching string literals." />
200
200
201
201
202
202
### <span className = " text-primary" >flag</span >
203
203
Adds a visual flag comment to the end of this Editable's source text.
204
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L926-L937 " />
204
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L939-L950 " />
205
205
206
206
207
207
<Return return_type = { <><span >CodeFlag[</span > <a href = " /api-reference/core/Argument" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Argument</a > <span >]</span ></> } description = " " />
@@ -217,7 +217,7 @@ Returns the name node of the object.
217
217
218
218
### <span className = " text-primary" >get_variable_usages</span >
219
219
Returns Editables for all TreeSitter nodes corresponding to instances of variable usage
220
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L902-L918 " />
220
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L909-L925 " />
221
221
222
222
<ParameterWrapper >
223
223
<Parameter
@@ -235,12 +235,12 @@ Returns Editables for all TreeSitter nodes corresponding to instances of variabl
235
235
</ParameterWrapper >
236
236
237
237
238
- <Return return_type = { <><span >list [</span > <a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >]</span ></> } description = " List of Editable objects representing variable usage nodes matching the given name." />
238
+ <Return return_type = { <><span >Sequence [</span > <a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >[</ span > < a href = " /api-reference/core/Argument " style = { {fontWeight: " inherit " , fontSize: " inherit " } } >Argument</ a > < span >] ]</span ></> } description = " List of Editable objects representing variable usage nodes matching the given name." />
239
239
240
240
241
241
### <span className = " text-primary" >insert_after</span >
242
242
Inserts code after this node.
243
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L603-L629 " />
243
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L608-L634 " />
244
244
245
245
<ParameterWrapper >
246
246
<Parameter
@@ -281,7 +281,7 @@ Inserts code after this node.
281
281
282
282
### <span className = " text-primary" >insert_before</span >
283
283
Inserts text before this node's source with optional indentation and newline handling.
284
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L570-L600 " />
284
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L575-L605 " />
285
285
286
286
<ParameterWrapper >
287
287
<Parameter
@@ -322,31 +322,31 @@ Inserts text before this node's source with optional indentation and newline han
322
322
323
323
### <span className = " text-primary" >is_wrapped_in</span >
324
324
Check if this node is contained another node of the given class
325
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1074-L1076 " />
325
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1087-L1089 " />
326
326
327
327
328
328
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >bool</code > } description = " " />
329
329
330
330
331
331
### <span className = " text-primary" >parent_of_type</span >
332
332
Find the first ancestor of the node of the given type. Does not return itself
333
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1079-L1085 " />
333
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1092-L1098 " />
334
334
335
335
336
336
<Return return_type = { <><a href = " /api-reference/core/Editable" style = { {fontWeight: " inherit" , fontSize: " inherit" } } >Editable</a > <span >| None</span ></> } description = " " />
337
337
338
338
339
339
### <span className = " text-primary" >reduce_condition</span >
340
340
Reduces an editable to the following condition
341
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1030-L1035 " />
341
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1043-L1048 " />
342
342
343
343
344
344
<Return return_type = { <code className = " text-sm bg-gray-100 px-2 py-0.5 rounded" >None</code > } description = " " />
345
345
346
346
347
347
### <span className = " text-primary" >remove</span >
348
348
Deletes this Node and its related extended nodes (e.g. decorators, comments).
349
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L682-L697 " />
349
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L687-L702 " />
350
350
351
351
<ParameterWrapper >
352
352
<Parameter
@@ -392,7 +392,7 @@ Sets the name of an object and updates all its usages.
392
392
393
393
### <span className = " text-primary" >replace</span >
394
394
Search and replace occurrences of text within this node's source and its extended nodes.
395
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L427-L451 " />
395
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L432-L456 " />
396
396
397
397
<ParameterWrapper >
398
398
<Parameter
@@ -433,7 +433,7 @@ Search and replace occurrences of text within this node's source and its extende
433
433
434
434
### <span className = " text-primary" >search</span >
435
435
Returns a list of all regex match of ` regex_pattern ` , similar to python's re.search().
436
- <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L515-L531 " />
436
+ <GithubLinkNote link = " https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L520-L536 " />
437
437
438
438
<ParameterWrapper >
439
439
<Parameter
0 commit comments