Skip to content

tree-sitter-grammars/tree-sitter-re2c

 
 

Repository files navigation

Tree-sitter for re2c

The tree-sitter-re2c is a re2c parser for tree-sitter.

Injection

The host languague shall be injected in the host_lang rule of this grammar.

Example of how this can be done with nvim-tree-sitter:

On the re2c/queries/injections.scm:

 (re2c
 . (host_lang) @_c
   (#match? @_c "^[ \t]*#include")) @c

 (re2c
 . (host_lang) @_c
   (#match? @_c "^[ \t]*#package main")) @go

References

Releases

No releases published

Languages

  • JavaScript 70.1%
  • Rust 14.0%
  • Scheme 10.6%
  • C++ 3.7%
  • Python 1.6%