tree-sitter-cli
tree-sitter-cli copied to clipboard
Print a list of tokens for debug purposes
Is there a command (much like parse) that prints a list of tokens?
I am asking because I am trying to debug an error that I am not sure of whether it is rooted in the parser or in the scanner.
You can use ‘tree-sitter parse my-file -d’ to print out some debugging information. Also, if you have graphviz installed, you can use the ‘-D’ flag to generate a graph that shows the progression of the parse stack.