An incremental parsing system for programming tools
https://tree-sitter.github.io
This PR adds an `--update` flag to the `tree-sitter test` command, which adds the ability to replace the _expected_ output in the corpus.txt with the _actual_ output produced by the parser, that is, we can now simply use this `--update` flag to write all the corresponding parser output back to the corpus.txt, and we just need to check the output without typing its actual sexp. - use the same output format as `tree-sitter parse`, except there won't be any position information printed. - the corpus.txt won't be touched if there's no difference between the _expected_ output and the _actual_ output in that file. - if there're differences between _expected_ and _actual_, only the test case that is different will be replaced, the rest test cases will stay as-is. (All the delimiters `===`/`---` will be normalized as 80-column long, though.) - this flag also works with `--filter` flag. |
||
|---|---|---|
| cli | ||
| docs | ||
| highlight | ||
| lib | ||
| script | ||
| test | ||
| .appveyor.yml | ||
| .gitignore | ||
| .gitmodules | ||
| .travis.yml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
tree-sitter
Tree-sitter is a parser generator tool and an incremental parsing library. It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. Tree-sitter aims to be:
- General enough to parse any programming language
- Fast enough to parse on every keystroke in a text editor
- Robust enough to provide useful results even in the presence of syntax errors
- Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application