2 releases

0.24.7 Oct 8, 2025
0.24.7-1 Dec 13, 2025

#641 in Parser implementations

Download history 215/week @ 2025-10-26 67/week @ 2025-11-02 184/week @ 2025-11-09 1190/week @ 2025-11-16 998/week @ 2025-11-23 408/week @ 2025-11-30 477/week @ 2025-12-07 466/week @ 2025-12-14 487/week @ 2025-12-21 892/week @ 2025-12-28 1513/week @ 2026-01-04 1162/week @ 2026-01-11 1088/week @ 2026-01-18 1105/week @ 2026-01-25 797/week @ 2026-02-01 734/week @ 2026-02-08

3,834 downloads per month
Used in 7 crates (3 directly)

MIT license

330KB
10K SLoC

C 9K SLoC JavaScript 524 SLoC // 0.0% comments Scheme 50 SLoC // 0.2% comments Rust 28 SLoC // 0.3% comments

tree-sitter-scheme

Build/test

Scheme grammar for tree-sitter.

Recent News

  • With R7RS support, a single | can no longer appear in the middle of an identifier.
  • The node directive no longer contains the sub node symbol. It is now a single node.
  • Some extensions were added, see below.

Status

tree-sitter-scheme should work on a superset of Scheme.

Different implementations might have conflicting grammars. I am not sure if I should support them. If you need some implementation-specific features, please open an issue, then I will consider supporting 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
    • character #\u[A-Fa-f0-9]+

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)
    • Steel Scheme (#17)

Usage

See nodes.md for all visible nodes.

This parser doesn't parse language constructs. Instead, it parses 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

Dependencies

~17–250KB