-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Labels
Description
This KCL program parses:
fn f = (i) => { return i + 1}
0 |> f(%)
This equivalent program doesn't:
fn f = (i) => { return i + 1}
- 0 |> f(%)
+ 0 |> if true {
+ f(%)
+ } else {
+ f(%)
+ }
Because the parser defines a pipeline expression as some expression followed by 1 or more CallExpression
, and in the second example, it's followed by an IfExpression
. Clearly the pipeline expression parser should allow this too.
Thanks @lf94 for leading me to this.