EmilLaursen / tree-sitter-bloblang

Tree sitter grammar and highlight queries for bloblang (benthos query language)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

demo gif

Goals

  • Highlighting for bloblang (.blobl)
  • Multidocument grammar for benthos configs
    • YAML grammer + bloblang grammer injection
    • Ditto for other potential configuration languages used with benthos (CUE/dhall)

Dev

A few development scripts are found in bin/dev. I use reflex to re-run tests on code changes. Look in dev script. A simple integration test is available integration_test, which parses all scripts from the benthos documentation.

Improvements

You can help!

  • Improvements can be made to the structure of the parse tree. Adding more field names etc.
  • More advanced highlighting features, such as variable scopes.
  • Enable bloblang injection into a YAML tree-sitter parse tree, giving proper syntax highlighting for benthos configuration files.
  • Current parser is more lenient and does not match 1-1 with the reference implementation. One example is variable/function names. We have no restrictions to snakecase. Also, I belive we allow more whitespace and comments than the reference implementation.

About

Tree sitter grammar and highlight queries for bloblang (benthos query language)

License:MIT License


Languages

Language:C 96.5%Language:JavaScript 1.8%Language:Rust 0.8%Language:Python 0.3%Language:Shell 0.3%Language:C++ 0.2%Language:Scheme 0.2%