module Rensei::Unparser::Ruby2_7_2
Private Instance Methods
NODE_OP_ASGN2(node, opt = {})
click to toggle source
attr assignment with operator format: [nd_recv]. [nd_next->nd_mid]= [nd_value]
where [attr]: [nd_next->nd_vid]
example: struct.field += foo
# File lib/rensei/unparser.rb, line 1516 def NODE_OP_ASGN2(node, opt = {}) node.children.then { |recv, _, attr, op, mid| "#{unparse(recv, opt)}.#{attr} #{op}= #{unparse(mid, opt)}" } end