mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
never try to push a statement_only
This commit is contained in:
parent
8dc5da9cc9
commit
701cdb4c13
1 changed files with 1 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Add table
Reference in a new issue