Skip to content

Conversation

@eldritchconundrum
Copy link
Collaborator

No description provided.

src/printer.fs Outdated
match decl.init with
| None -> ""
// comma operators must be wrapped by parentheses, only in a decl.
| Some (FunCall (Op ",", _) as i) -> out "=(%s)" (exprToS indent i)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd expect you can remove the special case.

untested:

let prec = precedence.[","]
exprToSLevel indent (prec + 1) i

@eldritchconundrum eldritchconundrum merged commit 06d10c7 into master Apr 29, 2024
@eldritchconundrum eldritchconundrum deleted the fix-comma-op-in-decl branch April 29, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants