Skip to content

Commit 2ecde0c

Browse files
committed
[Docs] Small tweaks to the design document
1 parent 372ed8d commit 2ecde0c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

doc/design.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ In short:
2222

2323
## Important Definitions
2424

25-
- Parser: A dynamic library compiled from C source code that is generated by the Tree-sitter tool. A parser reads source code for a particular language and produces a syntax tree.
26-
- Grammar: The rules that define how a parser will create the syntax tree for a language. The grammar is written in JavaScript. Tree-sitter tooling consumes the grammar as input and outputs C source (which can be compiled into a parser)
27-
- Syntax Tree: a tree data structure comprised of syntax nodes that represents some source code text.
28-
- Concrete Syntax Tree: Syntax trees that contain nodes for every token in the source code, including things likes brackets and parentheses. Tree-sitter creates Concrete Syntax Trees.
29-
- Abstract Syntax Tree: A syntax tree with less important details removed. An AST may contain a node for a list, but not individual parentheses. Tree-sitter does not create Abstract Syntax Trees.
30-
- Syntax Node: A node in a syntax tree. It represents some subset of a source code text. Each node has a type, defined by the grammar used to produce it. Some common node types represent language constructs like strings, integers, operators.
31-
- Named Syntax Node: A node that can be identified by a name given to it in the Tree-sitter Grammar. In clojure-ts-mode, `list_lit` is a named node for lists.
32-
- Anonymous Syntax Node: A node that cannot be identified by a name. In the Grammar these are identified by simple strings, not by complex Grammar rules. In clojure-ts-mode, `"("` and `")"` are anonymous nodes.
33-
- Font Locking: What Emacs calls "Syntax Highlighting".
25+
- **Parser**: A dynamic library compiled from C source code that is generated by the Tree-sitter tool. A parser reads source code for a particular language and produces a syntax tree.
26+
- **Grammar**: The rules that define how a parser will create the syntax tree for a language. The grammar is written in JavaScript. Tree-sitter tooling consumes the grammar as input and outputs C source (which can be compiled into a parser)
27+
- **Syntax Tree**: a tree data structure comprised of syntax nodes that represents some source code text.
28+
- **Concrete Syntax Tree**: Syntax trees that contain nodes for every token in the source code, including things likes brackets and parentheses. Tree-sitter creates Concrete Syntax Trees.
29+
- **Abstract Syntax Tree**: A syntax tree with less important details removed. An AST may contain a node for a list, but not individual parentheses. Tree-sitter does not create Abstract Syntax Trees.
30+
- **Syntax Node**: A node in a syntax tree. It represents some subset of a source code text. Each node has a type, defined by the grammar used to produce it. Some common node types represent language constructs like strings, integers, operators.
31+
- **Named Syntax Node**: A node that can be identified by a name given to it in the Tree-sitter Grammar. In clojure-ts-mode, `list_lit` is a named node for lists.
32+
- **Anonymous Syntax Node**: A node that cannot be identified by a name. In the Grammar these are identified by simple strings, not by complex Grammar rules. In clojure-ts-mode, `"("` and `")"` are anonymous nodes.
33+
- **Font Locking**: The Emacs terminology for "syntax highlighting".
3434

3535
## tree-sitter-clojure
3636

3737
`clojure-ts-mode` uses the experimental version tree-sitter-clojure grammar, which
3838
can be found at
3939
<https://github.com/sogaiu/tree-sitter-clojure/tree/unstable-20250526>. The
40-
`clojure-ts-mode` grammar provides very basic, low level nodes that try to match
40+
grammar provides very basic, low level nodes that try to match
4141
Clojure's very light syntax.
4242

4343
There are nodes to represent:
@@ -86,8 +86,8 @@ will produce a parse tree like so
8686
```
8787

8888
Although it's somewhat closer to how Clojure treats metadata itself, in the
89-
context of a text editor it creates some problems, which were discussed [here](https://github.com/sogaiu/tree-sitter-clojure/issues/65). To
90-
name a few:
89+
context of a text editor it creates some problems, which were discussed
90+
[here](https://github.com/sogaiu/tree-sitter-clojure/issues/65). To name a few:
9191

9292
- `forward-sexp` command would skip both, metadata and the node it's attached
9393
to. Called from an opening paren it would signal an error "No more sexp to

0 commit comments

Comments
 (0)