Skip to content

Commit 2cbcd2b

Browse files
authored
Merge pull request tree-sitter#336 from ccharles/reorder-doc-objects-for-consistency
Reorder objects in documentation for clarity
2 parents 70038bd + 9ce9a53 commit 2cbcd2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/section-2-using-parsers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Alternatively, you can use the library in a larger project by adding one source
3535

3636
## The Objects
3737

38-
There are four main types of objects involved when using Tree-sitter: languages, parsers, syntax trees, and syntax nodes. In C, these are called `TSParser`, `TSLanguage`, `TSTree`, and `TSNode`.
38+
There are four main types of objects involved when using Tree-sitter: languages, parsers, syntax trees, and syntax nodes. In C, these are called `TSLanguage`, `TSParser`, `TSTree`, and `TSNode`.
3939
* A `TSLanguage` is an opaque object that defines how to parse a particular programming language. The code for each `TSLanguage` is generated by Tree-sitter. Many languages are already available in separate git repositories within the the [Tree-sitter GitHub organization](https://github.com/tree-sitter). See [the next section](./creating-parsers) for how to create new languages.
4040
* A `TSParser` is a stateful object that can be assigned a `TSLanguage` and used to produce a `TSTree` based on some source code.
4141
* A `TSTree` represents the syntax tree of an entire source code file. Its contains `TSNode` instances that indicate the structure of the source code. It can also be edited and used to produce a new `TSTree` in the event that the source code changes.

0 commit comments

Comments
 (0)