Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 677 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 677 Bytes

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