idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.46k stars 368 forks source link

[ parser ] Fix issue parsing unquote #3253

Closed dunhamsteve closed 2 months ago

dunhamsteve commented 2 months ago

Description

This PR addresses #3251 - where unquote was picking up postfix expressions where it wasn't expected.

Previously, (g ~(f 5).fun) would unquote all of (f 5).fun and now it only unquotes (f 5). Similarly ~x.fun would unquote x.fun and now it only unquotes x.

The code from #3251 is used as a test case.

Should this change go in the CHANGELOG?

I've added it to CHANGELOG_NEXT since it may break existing code.

andrevidela commented 2 months ago

while I'm here, this looks good