Thank you for great work! I have been waiting eagerly tree-sitter'ing Perl sources! I found here and then tried to contribute immediately, but have some questions.
I found it cannot parse this code below because $/ is not defined in grammar.
local $/;
There are two solutions for this, I think.
Add to $.scalar_variable
Add to $.special_variable
I know $/ is “special”, so 2. is better, and editors such as Neovim should highlight $.special_variable to Constant.
But $/ is not “Constant”. It is variable. Do you think which should I add $/ (and $\, $|, and so on) into 1. or 2.?
And it seems that current grammar.js parse $1 .. $9, $! into $.scalar_variable. Also should it parse them into $.special_variable?
Thank you for great work! I have been waiting eagerly tree-sitter'ing Perl sources! I found here and then tried to contribute immediately, but have some questions.
I found it cannot parse this code below because
$/
is not defined in grammar.There are two solutions for this, I think.
$.scalar_variable
$.special_variable
I know
$/
is “special”, so 2. is better, and editors such as Neovim should highlight$.special_variable
toConstant
.But
$/
is not “Constant”. It is variable. Do you think which should I add$/
(and$\
,$|
, and so on) into 1. or 2.?And it seems that current grammar.js parse
$1
..$9
,$!
into$.scalar_variable
. Also should it parse them into$.special_variable
?