mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-19 03:44:23 -05:00
Revert "removing the special case for | or"
This reverts commit 9763839ed1.
This commit is contained in:
@@ -1284,16 +1284,15 @@ exports.IfNode: class IfNode extends BaseNode
|
||||
exports.PipeNode: class PipeNode extends BaseNode
|
||||
type: 'Pipe'
|
||||
|
||||
constructor: (left, right) ->
|
||||
constructor: (left, right, fallback) ->
|
||||
@children: [@left: left, @right: right]
|
||||
|
||||
compile_bitwise_or: (o) ->
|
||||
new OpNode('|', @left, @right).compile o
|
||||
@fallback: fallback
|
||||
|
||||
compile_node: (o) ->
|
||||
return compile_bitwise_or o unless @right instanceof CallNode and not (@right.is_new or @right.is_super)
|
||||
@right.args.unshift @left
|
||||
@right.compile o
|
||||
if @right instanceof CallNode and not (@right.is_new or @right.is_super)
|
||||
@right.args.unshift @left
|
||||
return @right.compile o
|
||||
new OpNode((if @fallback and @left instanceof PipeNode then '||' else '|'), @left, @right).compile o
|
||||
|
||||
# Faux-Nodes
|
||||
# ----------
|
||||
|
||||
Reference in New Issue
Block a user