-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
33 changed files
with
983 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
indent_size = 2 | ||
|
||
[*.rst] | ||
indent_size = 3 | ||
|
||
[*.{c,h,py}] | ||
indent_size = 4 | ||
max_line_length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- tree_sitter/** | ||
- docs/** | ||
|
||
concurrency: | ||
group: ${{github.workflow}}-${{github.ref}} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{steps.deploy.outputs.page_url}} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
- name: Install | ||
run: pip install -e .[docs] | ||
env: | ||
CFLAGS: "-O0 -g" | ||
- name: Build docs | ||
run: sphinx-build -M html docs docs/_build | ||
- name: Upload docs artifact | ||
uses: actions/deploy-pages@v3 | ||
with: | ||
path: docs/_build/html | ||
- name: Deploy to GitHub Pages | ||
id: deploy | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ dist | |
*.so | ||
__pycache__ | ||
wheelhouse | ||
docs/_build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Language | ||
======== | ||
|
||
.. autoclass:: tree_sitter.Language | ||
|
||
.. versionchanged:: 0.22.0 | ||
|
||
No longer accepts a ``name`` parameter. | ||
|
||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: field_id_for_name | ||
.. automethod:: field_name_for_id | ||
.. automethod:: id_for_node_kind | ||
.. automethod:: lookahead_iterator | ||
.. automethod:: next_state | ||
.. automethod:: node_kind_for_id | ||
.. automethod:: node_kind_is_named | ||
.. automethod:: node_kind_is_visible | ||
.. automethod:: query | ||
|
||
Special Methods | ||
--------------- | ||
|
||
.. automethod:: __eq__ | ||
|
||
.. versionadded:: 0.22.0 | ||
.. automethod:: __hash__ | ||
|
||
.. versionadded:: 0.22.0 | ||
.. automethod:: __index__ | ||
|
||
.. versionadded:: 0.22.0 | ||
.. automethod:: __int__ | ||
|
||
.. versionadded:: 0.22.0 | ||
.. automethod:: __ne__ | ||
|
||
.. versionadded:: 0.22.0 | ||
.. automethod:: __repr__ | ||
|
||
.. versionadded:: 0.22.0 | ||
|
||
|
||
Properties | ||
---------- | ||
|
||
.. autoattribute:: field_count | ||
.. autoattribute:: node_kind_count | ||
.. autoattribute:: parse_state_count | ||
.. autoattribute:: version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
LookaheadIterator | ||
================= | ||
|
||
.. autoclass:: tree_sitter.LookaheadIterator | ||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: iter_names | ||
.. automethod:: reset | ||
.. automethod:: reset_state | ||
|
||
Special methods | ||
--------------- | ||
|
||
.. automethod:: __iter__ | ||
.. automethod:: __next__ | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: current_symbol | ||
.. autoattribute:: current_symbol_name | ||
.. autoattribute:: language |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Node | ||
==== | ||
|
||
.. autoclass:: tree_sitter.Node | ||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: child | ||
.. automethod:: child_by_field_id | ||
.. automethod:: child_by_field_name | ||
.. automethod:: children_by_field_id | ||
.. automethod:: children_by_field_name | ||
.. automethod:: descendant_for_byte_range | ||
.. automethod:: descendant_for_point_range | ||
.. automethod:: edit | ||
.. automethod:: field_name_for_child | ||
.. automethod:: named_child | ||
.. automethod:: named_descendant_for_byte_range | ||
.. automethod:: named_descendant_for_point_range | ||
.. automethod:: sexp | ||
.. automethod:: walk | ||
|
||
Special Methods | ||
--------------- | ||
|
||
.. automethod:: __eq__ | ||
.. automethod:: __hash__ | ||
.. automethod:: __ne__ | ||
.. automethod:: __repr__ | ||
.. automethod:: __str__ | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: byte_range | ||
.. autoattribute:: child_count | ||
.. autoattribute:: children | ||
.. autoattribute:: descendant_count | ||
.. autoattribute:: end_byte | ||
.. autoattribute:: end_point | ||
.. autoattribute:: grammar_id | ||
.. autoattribute:: grammar_name | ||
.. autoattribute:: has_changes | ||
.. autoattribute:: has_error | ||
.. autoattribute:: id | ||
.. autoattribute:: is_error | ||
.. autoattribute:: is_extra | ||
.. autoattribute:: is_missing | ||
.. autoattribute:: is_named | ||
.. autoattribute:: kind_id | ||
.. autoattribute:: named_child_count | ||
.. autoattribute:: named_children | ||
.. autoattribute:: next_named_sibling | ||
.. autoattribute:: next_parse_state | ||
.. autoattribute:: next_sibling | ||
.. autoattribute:: parent | ||
.. autoattribute:: parse_state | ||
.. autoattribute:: prev_named_sibling | ||
.. autoattribute:: prev_sibling | ||
.. autoattribute:: range | ||
.. autoattribute:: start_byte | ||
.. autoattribute:: start_point | ||
.. autoattribute:: text | ||
.. autoattribute:: type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Parser | ||
====== | ||
|
||
.. autoclass:: tree_sitter.Parser | ||
|
||
.. versionadded:: 0.22.0 | ||
|
||
constructor | ||
|
||
Methods | ||
------- | ||
|
||
|
||
.. automethod:: parse | ||
.. automethod:: reset | ||
.. automethod:: set_included_ranges | ||
.. automethod:: set_language | ||
.. automethod:: set_timeout_micros | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: included_ranges | ||
|
||
.. versionadded:: 0.22.0 | ||
.. autoattribute:: language | ||
|
||
.. versionadded:: 0.22.0 | ||
.. autoattribute:: timeout_micros | ||
|
||
.. versionadded:: 0.22.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Point | ||
===== | ||
|
||
.. autoclass:: tree_sitter.Point | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: column | ||
.. autoattribute:: row |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Query | ||
===== | ||
|
||
.. autoclass:: tree_sitter.Query | ||
|
||
.. versionadded:: 0.22.0 | ||
|
||
constructor | ||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: captures | ||
.. automethod:: matches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Range | ||
===== | ||
|
||
.. autoclass:: tree_sitter.Range | ||
|
||
Special Methods | ||
--------------- | ||
|
||
.. automethod:: __eq__ | ||
.. automethod:: __ne__ | ||
.. automethod:: __repr__ | ||
.. automethod:: __hash__ | ||
|
||
.. versionadded:: 0.22.0 | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: end_byte | ||
.. autoattribute:: end_point | ||
.. autoattribute:: start_byte | ||
.. autoattribute:: start_point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Tree | ||
==== | ||
|
||
.. autoclass:: tree_sitter.Tree | ||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: changed_ranges | ||
.. automethod:: edit | ||
.. automethod:: root_node_with_offset | ||
.. automethod:: walk | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: included_ranges | ||
.. autoattribute:: root_node | ||
.. autoattribute:: text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
TreeCursor | ||
---------- | ||
|
||
.. autoclass:: tree_sitter.TreeCursor | ||
|
||
Methods | ||
------- | ||
|
||
.. automethod:: copy | ||
.. automethod:: goto_descendant | ||
.. automethod:: goto_first_child | ||
.. automethod:: goto_first_child_for_byte | ||
.. automethod:: goto_first_child_for_point | ||
.. automethod:: goto_last_child | ||
.. automethod:: goto_next_sibling | ||
.. automethod:: goto_parent | ||
.. automethod:: goto_previous_sibling | ||
.. automethod:: reset | ||
.. automethod:: reset_to | ||
|
||
Special methods | ||
--------------- | ||
|
||
.. automethod:: __copy__ | ||
|
||
Attributes | ||
---------- | ||
|
||
.. autoattribute:: depth | ||
.. autoattribute:: descendant_index | ||
.. autoattribute:: field_id | ||
.. autoattribute:: field_name | ||
.. autoattribute:: node |
Oops, something went wrong.