Add tree-sitter-eex parser for (L)EEx files (#2351)

This commit is contained in:
Clay 2022-01-25 08:52:51 -08:00 committed by GitHub
parent d2981d20da
commit 2532937ba1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 0 deletions

View file

@ -343,6 +343,16 @@ list.surface = {
maintainers = { "@connorlay" },
}
list.eex = {
install_info = {
url = "https://github.com/connorlay/tree-sitter-eex",
files = { "src/parser.c" },
branch = "main",
},
filetype = "eex",
maintainers = { "@connorlay" },
}
list.heex = {
install_info = {
url = "https://github.com/connorlay/tree-sitter-heex",

View file

@ -0,0 +1,15 @@
[
"%>"
"--%>"
"<%!--"
"<%"
"<%#"
"<%%="
"<%="
] @tag.delimiter
; EEx comments are highlighted as such
(comment) @comment
; Tree-sitter parser errors
(ERROR) @error

View file

@ -0,0 +1,5 @@
; EEx expressions are Elixir
(expression) @elixir
; EEx expressions can span multiple interpolated lines
(partial_expression) @elixir @combined

View file

@ -24,6 +24,11 @@
(#eq? @_sigil_name "F"))
; Zigler
(sigil
(sigil_name) @_sigil_name
(quoted_content) @eex
(#any-of? @_sigil_name "E" "L"))
(sigil
(sigil_name) @_sigil_name
(quoted_content) @zig