IndianBoy42 / tree-sitter-just

Treesitter grammar for Justfiles (casey/just)
Apache License 2.0
144 stars 26 forks source link

Try to parse shebang lines with a variable #179

Closed leon-barrett closed 1 week ago

leon-barrett commented 1 week ago

I believe this fixes this issue: https://github.com/IndianBoy42/tree-sitter-just/issues/175

I came to believe that the _opaque_shebang regex was eating too much and causing a parse error. I'm not sure I like this fix, but I'm a noob at tree-sitter, and maybe these breadcrumbs lead someone more experienced to a fix.

tgross35 commented 1 week ago

Hey cool, it looks like this fixes parsing of kitchen-sink.just (in the just repo). Could you delete these lines? https://github.com/IndianBoy42/tree-sitter-just/blob/449a1a5aefcc701fb9efc4c295d8c026553af2a3/justfile#L39-L41

tgross35 commented 1 week ago

I bumped the tree-sitter version since after you opened this PR, just FYI you might need to rebase and regenerate.

leon-barrett commented 1 week ago

I regenerated when I merged main, it looks like I got it right, whew.

tgross35 commented 1 week ago

Awesome! FYI you have two different commit emails (barrettnexus and sony), not sure if you care about that.

Not a problem here of course, I'll squash merge whenever you're ready (unless you just want to rebase to drop the merge commit)

leon-barrett commented 1 week ago

Okay, I've rebased, using my personal email. Thanks for noticing. Feel free to merge when you're ready.