Skip to content

fixes parsing issues and github links #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions docs/api-reference/core/Argument.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
import {GithubLinkNote} from '/snippets/GithubLinkNote.mdx';
import {Attribute} from '/snippets/Attribute.mdx';

<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/detached_symbols/argument.py#L30-L155" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L30-L155" />

### Inherits from
[HasValue](/api-reference/core/HasValue), [Expression](/api-reference/core/Expression), [HasName](/api-reference/core/HasName), [Editable](/api-reference/core/Editable)
Expand Down Expand Up @@ -111,7 +111,7 @@ import {Attribute} from '/snippets/Attribute.mdx';
<HorizontalDivider />
### <span className="text-primary">add_keyword</span>
Converts an unnamed argument to a named argument by adding a keyword.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/detached_symbols/argument.py#L105-L120" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/detached_symbols/argument.py#L105-L120" />

<ParameterWrapper>
<Parameter
Expand All @@ -128,15 +128,15 @@ Converts an unnamed argument to a named argument by adding a keyword.

### <span className="text-primary">ancestors</span>
Find all ancestors of the node of the given type. Does not return itself
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L1082-L1090" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1082-L1090" />


<Return return_type={ <><span className="text-gray-200">list[</span> <a href="/api-reference/core/Editable" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Editable</a> <span className="text-gray-200">]</span></> } description=""/>


### <span className="text-primary">edit</span>
Replace the source of this `Editable` with `new_src`.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L626-L654" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L626-L654" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -171,7 +171,7 @@ Replace the source of this `Editable` with `new_src`.

### <span className="text-primary">find</span>
Find and return matching nodes or substrings within an Editable instance.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L476-L493" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L476-L493" />

<ParameterWrapper>
<Parameter
Expand All @@ -194,7 +194,7 @@ Find and return matching nodes or substrings within an Editable instance.

### <span className="text-primary">find_string_literals</span>
Returns a list of string literals within this node's source that match any of the given
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L388-L402" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L388-L402" />

<ParameterWrapper>
<Parameter
Expand All @@ -217,23 +217,23 @@ Returns a list of string literals within this node's source that match any of th

### <span className="text-primary">flag</span>
Adds a visual flag comment to the end of this Editable's source text.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L920-L931" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L920-L931" />


<Return return_type={ <><span className="text-gray-200">CodeFlag[</span> <a href="/api-reference/core/Argument" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Argument</a> <span className="text-gray-200">]</span></> } description=""/>


### <span className="text-primary">get_name</span>
Returns the name node of the object.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/has_name.py#L52-L62" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/has_name.py#L52-L62" />


<Return return_type={ <><a href="/api-reference/core/Name" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Name</a> <span className="text-gray-200">|</span> <a href="/api-reference/core/ChainedAttribute" style={ {fontWeight: "inherit", fontSize: "inherit"} }>ChainedAttribute</a> <span className="text-gray-200">| None</span></> } description="The name node of the object. Can be a Name node for simple names, a ChainedAttribute for names with namespaces (e.g., a.b), or None if the object has no name."/>


### <span className="text-primary">get_variable_usages</span>
Returns Editables for all TreeSitter nodes corresponding to instances of variable usage
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L896-L912" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L896-L912" />

<ParameterWrapper>
<Parameter
Expand All @@ -256,7 +256,7 @@ Returns Editables for all TreeSitter nodes corresponding to instances of variabl

### <span className="text-primary">insert_after</span>
Inserts code after this node.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L597-L623" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L597-L623" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -297,7 +297,7 @@ Inserts code after this node.

### <span className="text-primary">insert_before</span>
Inserts text before this node's source with optional indentation and newline handling.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L564-L594" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L564-L594" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -338,31 +338,31 @@ Inserts text before this node's source with optional indentation and newline han

### <span className="text-primary">is_wrapped_in</span>
Check if this node is contained another node of the given class
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L1068-L1070" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1068-L1070" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">bool</code> } description=""/>


### <span className="text-primary">parent_of_type</span>
Find the first ancestor of the node of the given type. Does not return itself
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L1073-L1079" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1073-L1079" />


<Return return_type={ <><a href="/api-reference/core/Editable" style={ {fontWeight: "inherit", fontSize: "inherit"} }>Editable</a> <span className="text-gray-200">| None</span></> } description=""/>


### <span className="text-primary">reduce_condition</span>
Reduces an editable to the following condition
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L1024-L1029" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L1024-L1029" />


<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>


### <span className="text-primary">remove</span>
Deletes this Node and its related extended nodes (e.g. decorators, comments).
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L676-L691" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L676-L691" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -391,7 +391,7 @@ Deletes this Node and its related extended nodes (e.g. decorators, comments).

### <span className="text-primary">rename</span>
Sets the name of an object and updates all its usages.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/has_name.py#L80-L89" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/has_name.py#L80-L89" />

<ParameterWrapper>
<Parameter
Expand All @@ -408,7 +408,7 @@ Sets the name of an object and updates all its usages.

### <span className="text-primary">replace</span>
Search and replace occurrences of text within this node's source and its extended nodes.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L421-L445" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L421-L445" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -449,7 +449,7 @@ Search and replace occurrences of text within this node's source and its extende

### <span className="text-primary">search</span>
Returns a list of all regex match of `regex_pattern`, similar to python's re.search().
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/editable.py#L509-L525" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/editable.py#L509-L525" />

<ParameterWrapper>
<Parameter
Expand Down Expand Up @@ -478,7 +478,7 @@ Returns a list of all regex match of `regex_pattern`, similar to python's re.sea

### <span className="text-primary">set_name</span>
Sets the name of a code element.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/has_name.py#L65-L77" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/has_name.py#L65-L77" />

<ParameterWrapper>
<Parameter
Expand All @@ -495,7 +495,7 @@ Sets the name of a code element.

### <span className="text-primary">set_value</span>
Sets the value of the node's value Expression.
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/mintlify-doc-fix/src/codegen/sdk/core/interfaces/has_value.py#L23-L35" />
<GithubLinkNote link="https://github.com/codegen-sh/codegen-sdk/blob/develop/src/codegen/sdk/core/interfaces/has_value.py#L23-L35" />

<ParameterWrapper>
<Parameter
Expand Down
Loading
Loading