leonerd / tree-sitter-perl-LEGACY

a perl parser for javascript
MIT License
4 stars 0 forks source link

Properly support => autoquoting #19

Open rabbiveesh opened 2 years ago

rabbiveesh commented 2 years ago

In order to support =>'s important autoqouting function, we actually need to implement that in C. In previous renditions of this parser, the functionality was sort of faked for hash literals, but that's been removed as of #18 .

The interface is documented here, and there's already an implementation. My C isn't the best, so I'm hoping you can do this, @leonerd.

rabbiveesh commented 2 years ago

Basically, the only way you can get lookahead is with a custom C parser, and => requires lookahead from the bareword before it