nushell / tree-sitter-nu

A tree-sitter grammar for nu-lang, the language of nushell
MIT License
122 stars 27 forks source link

Closure parsed as a record #67

Closed fredericgiquel closed 10 months ago

fredericgiquel commented 10 months ago

In the following example:

#!/usr/bin/env nu

let $list = [a b c d]

# Correctly parsed
$list | filter {|x| $x | str starts-with c }

# Still valid but not correctly parsed
$list | filter { str starts-with c }

The closure for filter command is incorrectly parsed in the last line. And this leads to an error in the tree. tree-sitter-nu3

fdncred commented 10 months ago

Thanks. Do you know if this is with the latest main branch of this repo? There have been a lot of changes recently.

fredericgiquel commented 10 months ago

Yes. It's with the latest commit in main branch.

kit494way commented 10 months ago

same issue #16