Sha256: 166c82a88093409898e5029e60b78b5a3e584ad84118e58e15b2effa10f3161a
Contents?: true
Size: 621 Bytes
Versions: 16
Compression:
Stored size: 621 Bytes
Contents
module Ruby2JS class Converter # (dstr # (str 'a') # (...)) # (dsym # (str 'a') # (...)) handle :dstr, :dsym do |*children| children.map! do |child| if child.type == :begin and child.children.length == 1 child = child.children.first end if child.type == :send op_index = operator_index child.children[1] if op_index >= operator_index(:+) group child else parse child end else parse child end end children.join(' + ') end end end
Version data entries
16 entries across 16 versions & 1 rubygems