DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.55k stars 33 forks source link

Fix argument parsing #1293

Closed edemaine closed 4 months ago

edemaine commented 4 months ago

Fixes #918 by preventing accidental double matching of different cases of arguments.

This does not fix one missing PushIndent mentioned in https://github.com/DanielXMoore/Civet/issues/918#issuecomment-2189107922, which I'll probably leave for another PR: We don't consider indented expressions that are normal expressions, only those that are expressionized statements. So x =\n if ... is considered an indented expression, but x =\n y isn't. I think this is broken. For example, a =\n x\n y probably shouldn't parse as a function call.