wenkokke / talonfmt

Formatter for Talon files.
MIT License
6 stars 3 forks source link

Parse error on `key(")")` #100

Open fidgetingbits opened 11 months ago

fidgetingbits commented 11 months ago

It seems like talonfmt doesn't like the following syntax even though it's legitimate talon syntax:

Parse error on line 184 between column 10 and 11:
    key(")")
          ^^

If you use something like:

talon format test: key(")")

you can confirm that talon handles this fine

wenkokke commented 11 months ago

This is an issue caused by the implicit strings.

Solving this would require parsing the values as strings, with implicits as a fallback... which is a little bit trickier.

Ultimately, this is a tree-sitter-talon bug.

wenkokke commented 11 months ago

It's fairly easy to special-case this literal string. It's a lot trickier to handle the general case.

fidgetingbits commented 11 months ago

Happy to file against tree-sitter-talon if you prefer.

fwiw I already can't run talonfmt in precommit on my repo due to the parrot stuff failing checks, so this issue doesn't actually affect me too much atm. But this being regular talon syntax I suppose it is a bit more likely it could find its way into community eventually somehow.