Skip to content

Commit e1c60ad

Browse files
committed
docs: add usage examples to README.md
Addresses #37
1 parent 0b42e19 commit e1c60ad

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ Macros with special respresentation in syntax tree (when written with lowercase
2323

2424
This grammar is used in https://github.com/Wilfred/difftastic to generate syntax-ware diffs for Common Lisp.
2525

26+
## Usage
27+
28+
- C/C++
29+
- compilation run `make` (optional `make install`)
30+
- set `tree_sitter_commonlisp()` as language on your Tree-Sitter parser https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/c/tree-sitter-commonlisp.h#L10-L10
31+
- Python (`pip install tree-sitter-commonlisp tree-sitter`)
32+
https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/python/tests/test_import.py#L15-L23
33+
- Rust `cargo add tree-sitter tree-sitter-grammars`
34+
https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/rust/lib.rs#L47-L50
35+
- Swift
36+
https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/swift/TreeSitterCommonlispTests/TreeSitterCommonlispTests.swift#L3-L13
37+
- Go
38+
https://github.com/tree-sitter-grammars/tree-sitter-commonlisp/blob/4d2a2247bb0ec117193ef33e3ce546a6781c5bf5/bindings/go/binding_test.go#L1-L15
39+
2640
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter-grammars/tree-sitter-commonlisp/ci.yml?logo=github&label=CI
2741
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
2842
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix

0 commit comments

Comments
 (0)