You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that (after commit 2cab26dc9d6dcd31115c65a3eec43689020ae654), functions where the entire body is in a context keyword is parenthesized. Was this intended ?
This doesn't affect let bindings that are not functions.
I thought that, compared to how if statements are not enclosed in parentheses, this is a bit inconsistent.
Example:
Before
#letfoo() =context {
5
}
After
#letfoo() = (
context {
5
}
)
`if` expressions are not in parentheses
#letfoo() =iftrue {
5
} else {
6
}
Thanks a lot and have a nice day :)
The text was updated successfully, but these errors were encountered:
This is related to #114 regards to parenthesizes around expressions. Ideally, we should maintain the length of the first line of the expression, if the length of #let foo() = context { exceed the column width, we should switch to
#let foo() = (
context {
...
}
)
However this is hard to implement in currect pretty printer. The current behavior is that, if the whole thing on the rhs of = cannot fit in a single line, a parenthesize will be added around it.
I cannot remember why I decide to do this. Maybe this is because changing this can make my testset looks better.
Hello,
I noticed that (after commit
2cab26dc9d6dcd31115c65a3eec43689020ae654
), functions where the entire body is in a context keyword is parenthesized. Was this intended ?This doesn't affect let bindings that are not functions.
I thought that, compared to how if statements are not enclosed in parentheses, this is a bit inconsistent.
Example:
Thanks a lot and have a nice day :)
The text was updated successfully, but these errors were encountered: