Skip to content

🐛 GritQL parser errors on unkeyed pattern/function/predicate arguments #10114

Description

@Bertie690

Environment information

N/A (reproducible on playground)

What happened?

  1. Paste the example on GritQL's website about how to use patterns (specifically the one about unkeyed arguments being allowed).
  2. Watch as Biome spits out errors for "missing" arguments!

https://biomejs.dev/playground/?tab=formatter&pane=GritQL&gritQuery=pattern+console_method_to_info%28%24method%29+%7B%0A++%60console.%24method%28%24message%29%60+%3D%3E+%60console.info%28%24message%29%60%0A%7D%0A%2F%2F+works+if+you+put+%22method+%3D+%60log%60%22%0Aconsole_method_to_info%28%60log%60%29%0A

Expected result

It should compile and not produce an error.

Pattern parameter names can be omitted as long as arguments are provided in the same order as the parameters are defined.

  • aforementioned website

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-Needs triageStatus: this issue needs to be triaged

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions