https://github.com/semgrep/sexp-fmt
Basic S-expression formatter
https://github.com/semgrep/sexp-fmt
Last synced: about 1 year ago
JSON representation
Basic S-expression formatter
- Host: GitHub
- URL: https://github.com/semgrep/sexp-fmt
- Owner: semgrep
- License: gpl-3.0
- Created: 2021-10-15T04:25:57.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-15T05:27:31.000Z (almost 5 years ago)
- Last Synced: 2025-03-30T18:51:06.948Z (over 1 year ago)
- Language: OCaml
- Size: 18.6 KB
- Stars: 13
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
sexp-fmt
==
Quick and dirty S-expression formatter.
This is suitable for formatting test cases for tree-sitter grammars
such as
[this](https://github.com/tree-sitter/tree-sitter-javascript/blob/master/test/corpus/statements.txt).
Sample input:
```
(program (command (command_name (concatenation (expansion (variable_name)) (word))) (word) (word)))
```
Output:
```
(program
(command
(command_name
(concatenation
(expansion
(variable_name))
(word)))
(word)
(word)))
```
Installation
--
You'll need OCaml and `dune` for the build. You can install them with
`opam install dune`.
From this repo, run `make`. The executable `sexp-fmt` is all you need
after this.