The tree-sitter-modelica was lacking tests to check if each element is shown correctly in the syntax tree.
So I added tests for the grammar. For each test I created a small example code and afterwards the syntax tree that should be created based on the grammar.
Part of the example code that were used are a direct copy of mtiller/modelica-tree-sitter.
Code copied:
long_class.txt
short_class.txt
Long Class with Decleration
Long Class with Redecleration
Simple Equation
Tests for:
Class (Long , Short , Enumeration, Derivative)
External function call
Extend clause
Component clause
Redeclaration and Replaceable clause
Equations (Simple, If, For, While, When and Connect)
The tree-sitter-modelica was lacking tests to check if each element is shown correctly in the syntax tree. So I added tests for the grammar. For each test I created a small example code and afterwards the syntax tree that should be created based on the grammar. Part of the example code that were used are a direct copy of mtiller/modelica-tree-sitter.
Code copied:
Tests for: