OpenModelica / tree-sitter-modelica

A tree-sitter parser for Modelica
Other
3 stars 5 forks source link

Add Syntax Highlighting Rules #2

Closed AnHeuermann closed 10 months ago

AnHeuermann commented 1 year ago

Add syntax highlighting queries to queries/highlights.scm. They are documented in https://tree-sitter.github.io/tree-sitter/syntax-highlighting.

This file looks something like this:

;;;; Syntax Highlighting Querries

;; Keywords
[
  "record"
  "end"
] @keyword

;; Base types
(real_type) @type.builtin
(integer_type) @type.builtin

;; Complex types
(record_definition (record_statement) @type)
(record_definition (_end_of_statement) @type)
AnHeuermann commented 10 months ago

Added in https://github.com/OpenModelica/tree-sitter-modelica/pull/6