mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
never try to push a statement_only
This commit is contained in:
@@ -661,6 +661,7 @@ module CoffeeScript
|
||||
# code generation to generate a quick "array.push(value)" tree of nodes.
|
||||
class PushNode
|
||||
def self.wrap(array, expressions)
|
||||
return expressions if expressions.unwrap.statement_only?
|
||||
Expressions.wrap(CallNode.new(
|
||||
ValueNode.new(LiteralNode.new(array), [AccessorNode.new('push')]),
|
||||
[expressions.unwrap]
|
||||
|
||||
Reference in New Issue
Block a user