tree-sitter / tree-sitter-embedded-template

Tree-sitter grammar for embedded template languages like ERB, EJS
MIT License
60 stars 18 forks source link

Parsing fails on empty ERB comments #9

Closed hmac closed 2 years ago

hmac commented 3 years ago

The following code, a comment block with no comment text, will fail to parse:

<%# %>
(template [0, 0] - [1, 0]
  (comment_directive [0, 0] - [1, 0]
    (comment [0, 3] - [1, 0])))
example.erb 0 ms    (MISSING "%>" [1, 0] - [1, 0])