Skip to content

Commit e2f01c9

Browse files
docs: updated API reference
1 parent 93c1b71 commit e2f01c9

File tree

4 files changed

+46
-52
lines changed

4 files changed

+46
-52
lines changed

docs/api-reference/core/SourceFile.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {HorizontalDivider} from '/snippets/HorizontalDivider.mdx';
1111
import {GithubLinkNote} from '/snippets/GithubLinkNote.mdx';
1212
import {Attribute} from '/snippets/Attribute.mdx';
1313

14-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L412-L1190" />
14+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L412-L1192" />
1515

1616
### Inherits from
1717
[Usable](/api-reference/core/Usable), [HasBlock](/api-reference/core/HasBlock), [File](/api-reference/core/File), [Importable](/api-reference/core/Importable), [Expression](/api-reference/core/Expression), [Editable](/api-reference/core/Editable), [HasName](/api-reference/core/HasName)
@@ -186,7 +186,7 @@ Adds a decorator to a function or method.
186186

187187
### <span className="text-primary">add_import</span>
188188
Adds an import to the file.
189-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L975-L1023" />
189+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L977-L1025" />
190190

191191
<ParameterWrapper>
192192
<Parameter
@@ -221,7 +221,7 @@ Adds an import to the file.
221221

222222
### <span className="text-primary">add_symbol</span>
223223
Adds `symbol` to the file.
224-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1046-L1077" />
224+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1048-L1079" />
225225

226226
<ParameterWrapper>
227227
<Parameter
@@ -244,7 +244,7 @@ Adds `symbol` to the file.
244244

245245
### <span className="text-primary">add_symbol_from_source</span>
246246
Adds a symbol to a file from a string representation.
247-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1026-L1043" />
247+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1028-L1045" />
248248

249249
<ParameterWrapper>
250250
<Parameter
@@ -350,7 +350,7 @@ Find and return matching nodes or substrings within an Editable instance.
350350

351351
### <span className="text-primary">find_by_byte_range</span>
352352
Finds all editable objects that overlap with the given byte range in the file.
353-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1173-L1185" />
353+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1175-L1187" />
354354

355355
<ParameterWrapper>
356356
<Parameter
@@ -661,7 +661,7 @@ Removes the file from the file system and graph.
661661

662662
### <span className="text-primary">remove_unused_exports</span>
663663
Removes unused exports from the file.
664-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L937-L944" />
664+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L939-L946" />
665665

666666

667667
<Return return_type={ <code className="text-sm bg-gray-100 px-2 py-0.5 rounded">None</code> } description=""/>
@@ -838,7 +838,7 @@ Returns all Symbols in the file, sorted by position in the file.
838838

839839
### <span className="text-primary">update_filepath</span>
840840
Renames the file and updates all imports to point to the new location.
841-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L951-L972" />
841+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L953-L974" />
842842

843843
<ParameterWrapper>
844844
<Parameter

docs/api-reference/python/PyFile.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ Adds an import to the file.
225225

226226
### <span className="text-primary">add_symbol</span>
227227
Adds `symbol` to the file.
228-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1046-L1077" />
228+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1048-L1079" />
229229

230230
<ParameterWrapper>
231231
<Parameter
@@ -248,7 +248,7 @@ Adds `symbol` to the file.
248248

249249
### <span className="text-primary">add_symbol_from_source</span>
250250
Adds a symbol to a file from a string representation.
251-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1026-L1043" />
251+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1028-L1045" />
252252

253253
<ParameterWrapper>
254254
<Parameter
@@ -354,7 +354,7 @@ Find and return matching nodes or substrings within an Editable instance.
354354

355355
### <span className="text-primary">find_by_byte_range</span>
356356
Finds all editable objects that overlap with the given byte range in the file.
357-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1173-L1185" />
357+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1175-L1187" />
358358

359359
<ParameterWrapper>
360360
<Parameter
@@ -912,7 +912,7 @@ Returns all Symbols in the file, sorted by position in the file.
912912

913913
### <span className="text-primary">update_filepath</span>
914914
Renames the file and updates all imports to point to the new location.
915-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L951-L972" />
915+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L953-L974" />
916916

917917
<ParameterWrapper>
918918
<Parameter

docs/api-reference/typescript/TSFile.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Adds an export keyword to a symbol in a TypeScript file.
259259

260260
### <span className="text-primary">add_import</span>
261261
Adds an import to the file.
262-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L975-L1023" />
262+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L977-L1025" />
263263

264264
<ParameterWrapper>
265265
<Parameter
@@ -294,7 +294,7 @@ Adds an import to the file.
294294

295295
### <span className="text-primary">add_symbol</span>
296296
Adds `symbol` to the file.
297-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1046-L1077" />
297+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1048-L1079" />
298298

299299
<ParameterWrapper>
300300
<Parameter
@@ -317,7 +317,7 @@ Adds `symbol` to the file.
317317

318318
### <span className="text-primary">add_symbol_from_source</span>
319319
Adds a symbol to a file from a string representation.
320-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1026-L1043" />
320+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1028-L1045" />
321321

322322
<ParameterWrapper>
323323
<Parameter
@@ -423,7 +423,7 @@ Find and return matching nodes or substrings within an Editable instance.
423423

424424
### <span className="text-primary">find_by_byte_range</span>
425425
Finds all editable objects that overlap with the given byte range in the file.
426-
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1173-L1185" />
426+
<GithubLinkNote link="https://github.com/codegen-sh/graph-sitter/blob/develop/src/graph_sitter/core/file.py#L1175-L1187" />
427427

428428
<ParameterWrapper>
429429
<Parameter

0 commit comments

Comments
 (0)