tree-sitter-scheme
tree-sitter-scheme copied to clipboard
Scheme grammar for tree-sitter
tree-sitter-scheme
Scheme grammar for tree-sitter.
Recent News
- With R7RS support, a single
|can no longer appears in the middle of an identifier. - The nodes
directiveno longer contain sub nodessymbol. Now it's a single node. - some extensions added, see below
Status
~~tree-sitter-scheme should work on a superset of Scheme.~~
Different Implementations might have conflict grammar. I am not sure if I should support them. If you need some implementation-specific features, please open an issue, then I will consider support it.
current status:
- [x] R5RS
- [x] R6RS
- [x] R7RS
- [ ] Extensions
- [x]
{}as replacement for()or[] - [x] extend symbols which can start with digits, period, ... etc as long as it's not a number
- [x] keyword
#:symbol - [x] escape sequence in string
\+ any character - [x] characters
#\bel,#\ls,#\nel,#\rubout,#\vt
- [x]
Please open an issue to let me know it's really used if you want to add new extensions.
Implementation
Usage
See nodes.md for all visible nodes.
This parser don't parse language constructs. Instead, it parse code as lists.
If you want language constructs support, use custom queries (see #5), also see thchha/tree-sitter-scheme.
Query
The queries here are too simple and not intended to be useful in an editor. Please open an issue if you have suggestions.
Reference
Scheme
Tree-sitter