This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
It's confusing to have tests in two different top-level directories when working between different grammars, and most of them use `test/corpus` which is more fitting, so time to go.
C++ has been a headache to deal with throughout the ecosystem and for
several downstream projects. It is difficult to get working with WASM,
and induces potential issues with compilation on Windows. It has been
proven that writing scanners in C is a much better alternative, and is
the recommended way to write scanners now. C++ support will likely be
removed in 0.21.0
* Removed convention notes introduced in #1947 due to:
* It doesn't so strict for bindings and they may need to obey to some
target language conventions.
* For language grammars there is a note that states the same in the
`Creating Parsers` section.
* Removed `External Scanning` item introduced in 87a0517 commit
originated from #1612 due to unclear consistency with other
5 original statements. There is a similar explanation in the
`Other External Scanner Details` section.
* External scanners and infinite loops
* Terminal keywords in externals array
* Using error sentinel external token
* Good practice to erase state variables in deserialize func
* Emphasize external scanner is called first
* Documented test separator suffixes
* Documented partial precedences field
* Added external scanning to conflicting tokens rules
* Added earliest starting position to conflicting tokens rules
* Added note about lexical precedence vs. parse precedence
* Added note about tree-sitter calling external scanner with all
tokens marked valid during error recovery
Previously the rule names could not begin with an uppercase M or U
because the test output formatter assumed that they represent special
tokens: MISSING or UEXPECTED.
Fixes#1940.