tree-sitter-cli
tree-sitter-cli copied to clipboard
CLI tool for creating and testing tree-sitter parsers
I have a grammar that uses this regex to match comments (it's in the `extras` array): ``` comment: $ => /((\/\/[^\r\n]*)|(\/\*(.|\s)*?\*\/))/ ``` This fails on the following test: ``` =====================================...
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...
The language I am implementing really needs this functionality, as I am using it for file/script endings. `/\s*$/`
``` $ npm install tree-sitter-cli > [email protected] install /home/alberto/node_modules/tree-sitter-cli > node-gyp rebuild gyp: vendor/tree-sitter/project.gyp not found (cwd: /home/alberto/projects/tree-sitter/tree-sitter-cli) while loading dependencies of binding.gyp while trying to load binding.gyp gyp ERR!...
⚠️ WIP ⚠️ Refs https://github.com/tree-sitter/tree-sitter/pull/246
When running `tree-sitter test` on [this repo](https://github.com/th-we/tree-sitter-crash-demo), the command will hang and eat more and more memory until it crashes. In the test case, there is a "ZERO WIDTH NO-BREAK...
Without these you'll get one of these errors `TypeError: Cannot read property 'constructor' of undefined` or `TypeError: Cannot read property 'constructor' of null`.
``` Uncaught RangeError: Incompatible language version. Expected 8. Got 9 ``` I cannot understand this error message (though I kept hitting it, that's another problem 😢). * Is it Atom...
Specifically, throw if grammar builder functions are passed wrong number of args. This catches the common (for me) problem of doing something like `optional('+', $.term)` when I meant to do...