Show What's Parsed In Tree-Sitter Tests
Notes
-
Install graphviz
(e.g. `brew install graphviz``)
-
Run tests with:
tree-sitter test -D -f file-to-test.txt
(TBD on if you need to have the full path to the file or the name of the test in the test suite)
-
The `-D`` flag produces a log.html file and attempts to open it automatically
-
The `-f`` flag points to a specific file. I do this since there's a lot of stuff that happens for each test and it makes it easier to see what's up
-
Scroll all the way down to see the final output. I find it easier to read errors with that format
Here's an example of what it looks like:
The Test
===============
Title Section 1
===============
-- title
basic
---
(source_file
(title_section
(title_token)
(empty_line)
(title_headline
(paragraph_first_word)
)
)
)
The Output