-
Notifications
You must be signed in to change notification settings - Fork 9
Implement pipeline #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I think it's a good start, just a few small things but we can merge it otherwise. I actually started working on this but never finished it, it's on my |
|
Thanks! I'll look what you have done before :-) |
|
OK, looks good. Can you put the CI change to a separate PR? Could be even 24.04. |
Closes: #37
This pr introduces a new
AstNode::Pipelinevariant. When parsing block, it may run intopipeline_or_expression_or_assignmentwhich may returnPipeline/Expression/Assignment. And it enablesletandmutusing pipelines, so the following is possible:Changes in detail
math_expression, change rhs fromexpressiontopipeline_or_expression, so$y = 7 | 8 | 9is available, it also returnsMathExpressionNode, so it can be used easier inpipeline_or_expression_or_assignment.let_statement,mut_statement, change initializer topipeline_or_expression, solet x = 7 | 8,mut y = 5 | 6is availablepipeline_or_expression, in detail, if it get the first expression, and it failed to read apipe, then it returns an Expression node, or else it will consume pipes and return anPipelinenode.