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
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.
I think an IfExpression should be a valid expression in a pipeline expression if each clause (not including the conditional) is a CallExpression. Should this be more permissive such that a valid IfExpression in a pipeline expression is one where each clause (not including the conditional) is an expression that contains substitution operator?
This KCL program parses:
This equivalent program doesn't:
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 anIfExpression
. Clearly the pipeline expression parser should allow this too.Thanks @lf94 for leading me to this.
The text was updated successfully, but these errors were encountered: