Revert "Added Unix-like piping. Allows chaining of function calls where every succeeding call receives as first argument the result of all preceding expressions."

This reverts commit 7ee10e06be.
This commit is contained in:
Jeremy Ashkenas
2010-03-27 15:25:34 -04:00
parent 4dd40034ed
commit eaf4a71d32
6 changed files with 169 additions and 257 deletions

View File

@@ -73,7 +73,6 @@ grammar: {
# of many other rules, making them somewhat circular.
Expression: [
o "Value"
o "Pipe"
o "Call"
o "Curry"
o "Code"
@@ -260,13 +259,6 @@ grammar: {
o "INDENT AssignList , OUTDENT", -> $2
]
# Unix-like pipe for chained function calls. Reverts to `OpNode` for bitwise
# operations.
Pipe: [
o "Expression | Expression", -> new PipeNode $1, $3
o "Expression | || Expression", -> new PipeNode $1, $4, true
]
# The three flavors of function call: normal, object instantiation with `new`,
# and calling `super()`
Call: [
@@ -499,6 +491,7 @@ grammar: {
o "Expression >> Expression", -> new OpNode '>>', $1, $3
o "Expression >>> Expression", -> new OpNode '>>>', $1, $3
o "Expression & Expression", -> new OpNode '&', $1, $3
o "Expression | Expression", -> new OpNode '|', $1, $3
o "Expression ^ Expression", -> new OpNode '^', $1, $3
o "Expression <= Expression", -> new OpNode '<=', $1, $3