slackhq / tree-sitter-hack

Hack grammar for tree-sitter
MIT License
33 stars 16 forks source link

[BUG] String Interpolation is not supported #69

Open mmanela opened 5 months ago

mmanela commented 5 months ago

Describe the bug

The grammar does not handle string interpolation

Requirements

To Reproduce

Grammar does not handle string interpolation preventing properly highlighting variables inside the string

For example this expression

$y = "hello $x[0]";

Generates a tree like this, notice the right node is just a string

(expression_statement 
        (binary_expression 
          left: (variable) 
          right: (string))) 

Expected behavior

I expect to be able to highlight variables inside of a string