**Testing Grammar Changes** Next we'll need to test out all of the changes we've made to the grammar, to make sure the programming language is still intact. When we've passed all of our tests, then we can continue going forward in adding this programming language to the Legesher repository.
We'll need to recompile the grammar with the changes we've made.
* Run `tree-sitter generate`
* Run `node-gyp configure`
_NOTE_: Run `npm run build` to do all of the required steps in one command
We will eventually need to publish the tree-sitter parser to npm, but in the meantime for developing the package and the grammar, you can test it locally using `apm link`.
* `tree-sitter generate` will update the `src` folder and the `build` folder with updated tree-sitter parsers.
> This will generate the C code required to parse this trivial language, as well as a few files that are needed to compile and load this native parser as a Node.js module.
### The Command: `generate`
> The most important command you’ll use is tree-sitter generate. This command reads the grammar.js file in your current working directory and creates a file called src/parser.c, which implements the parser. After making changes to your grammar, just run tree-sitter generate again. The first time you run tree-sitter generate, it will also generate a few other files: binding.gyp - This file tells Node.js how to compile your language. index.js - This is the file that Node.js initially loads when using your language. src/binding.cc - This file wraps your language in a JavaScript object when used in Node.js src/tree\_sitter/parser.h - This file provides some basic C definitions that are used in your generated parser.c file. If there is an ambiguity or local ambiguity in your grammar, Tree-sitter will detect it during parser generation, and it will exit with a Unresolved conflict error message. See below for more information on these errors.
**Syntax Highlighting** Tree-sitter grammars are now using the [`tree-sitter/highlight-schema`](https://github.com/tree-sitter/highlight-schema) JSON repository for their styling in the text editor. This can be found in the `properties/highlights.css` and `src/highlights.json` files.
This tool is available within [npm's package listings](https://www.npmjs.com/package/tree-sitter-legesher-python) and needs to be updated within there. Here are the instructions to follow to update this specific package:
* Update the package.json file with the next version associated with the type of change \(major, minor, or patch\). or run `npm version NEW.VERSION.HERE`
* commit that change to the master branch
* run `npm publish` to update package
* run `npm install` to use new updated version
* properties/highlights.json