darklang / dark

Darklang main repo, including language, backend, and infra
https://darklang.com
Other
1.65k stars 90 forks source link

Fix FnCall #5363

Closed OceanOak closed 3 months ago

OceanOak commented 3 months ago

we accidentally got away from how we normally represent function calls in writtenTypes.dark, this pr fixes it.

5321

StachuDotNet commented 3 months ago

also, I think the answer to

Grammar: Rename function_call to apply?

is yes

OceanOak commented 3 months ago

isn't there chance for ambiguity when passing one of these into a fn argument?

I've added more tests around this, and a todo to reconsider having enums as a simple_expression. maybe once we remove the parentheses around enum field, it could cause ambiguity (not sure). Thanks for pointing it out

StachuDotNet commented 3 months ago

great work here!