darklang / dark

Darklang main repo, including language, backend, and infra
https://darklang.com
Other
1.65k stars 90 forks source link

Implement a Formatter for Tree-Sitter Grammar Tests in Darklang #5378

Open OceanOak opened 3 months ago

OceanOak commented 3 months ago

We tried to plug tree-sitter-tests-formatter in our repository, to format tree-sitter-darklang/test/corpus test files, but decided against it due to the 1.5 GB ( for Rust) it would add to the Dockerfile

We want to write a formatter for our Tree-sitter grammar tests in Darklang

Notes:

Example of a formatted test:

==================
boolean - true
==================

true

---

(source_file 
  (expression 
    (simple_expression 
      (bool_literal)
    )
  )
)

Misc: