With Tree-Sitter you can create tests for the highlighting queries created
Tests are written as normal source code files that contain specially-formatted comments that make assertions about the surrounding syntax highlighting
The specially-formatted comments are line comments like the one in the grammar file but the function have to be named 'comment' to work correctly
Therefore the function name was changed to 'comment'
Block Comment
BLOCK_COMMENT was modified because the old version of the regex-code didn't work throughout different lines of code (only for one just like the line comment)
The new regex code for it was copied directly from MTillers 'comment' function inside his grammar.js file
Nodes
Underscores hide nodes inside a syntax tree were deleted to make highlight queries inside the highlight.scm file easier to write
Making parts of the syntax tree visible lead to adjusting the tests inside the test/corpus folder that were created to test the context-free grammar
Syntax Highlighting
Created the highlights.scm file
Added Queries to the file
The highlights query uses captures to assign arbitrary highlight names to different nodes in the tree.
Changes made to the grammar.js file
Block Comment
Nodes
Syntax Highlighting