Skip to content

alemuller/tree-sitter-re2c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

About

re2c grammar for tree-sitter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages