a structural diff that understands syntax 🟥🟩
 
 
 
 
 
Go to file
6cdh 85b6188fb7 fix clippy lints 2023-09-01 09:52:02 +07:00
.github/workflows fix test cases 2023-04-22 17:51:55 +07:00
bindings fix clippy lints 2023-09-01 09:52:02 +07:00
corpus feat(grammar): add escape sequence extension 2023-08-02 13:10:31 +07:00
queries Update highlights.scm 2022-06-07 22:14:20 +07:00
src feat(grammar): add escape sequence extension 2023-08-02 13:10:31 +07:00
.editorconfig init 2022-04-01 13:47:05 +07:00
.gitignore Add CI 2022-04-02 14:22:53 +07:00
CONTRIBUTING.md docs(README): update 2023-06-03 14:01:21 +07:00
Cargo.toml bump version: 0.6.0 2023-08-02 13:19:23 +07:00
LICENSE LICENSE 2022-04-01 13:55:47 +07:00
README.md update(README): news 2023-08-03 18:44:40 +07:00
binding.gyp init 2022-04-01 13:47:05 +07:00
grammar.js feat(grammar): add escape sequence extension 2023-08-02 13:10:31 +07:00
nodes.md feat(grammar): add keyword extension 2023-08-02 11:58:37 +07:00
package.json bump version: 0.6.0 2023-08-02 13:19:23 +07:00
shell.nix init 2022-04-01 13:47:05 +07:00

README.md

tree-sitter-scheme

Build/test

Scheme grammar for tree-sitter.

Recent News

  • With R7RS support, a single | can no longer appears in the middle of an identifier.
  • The nodes directive no longer contain sub nodes symbol. 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:

  • R5RS
  • R6RS
  • R7RS
  • Extensions
    • {} as replacement for () or []
    • extend symbols which can start with digits, period, ... etc as long as it's not a number
    • keyword #:symbol
    • escape sequence in string \ + any character
    • characters #\bel, #\ls, #\nel, #\rubout, #\vt

Please open an issue to let me know it's really used if you want to add new extensions.

Implementation

  • Support for implementation
    • Chez Scheme (#1)
    • Chicken Scheme (#3)
    • Guile Scheme (#7)

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