Class: DTRToRust::Instruction::AddAndAssign

Inherits:
Handler
  • Object
show all
Defined in:
lib/instruction/add_and_assign.rb

Overview

This class is responsible for generating Rust code for the AddAndAssign instruction.

Instance Method Summary collapse

Methods inherited from Handler

#form_rust_string, handle, #initialize, #spacing

Constructor Details

This class inherits a constructor from DTRToRust::Instruction::Handler

Instance Method Details

#handleObject



7
8
9
# File 'lib/instruction/add_and_assign.rb', line 7

def handle
  form_rust_string("#{@instruction[:inputs][0]} += #{@instruction[:inputs][1]};", @instruction[:scope])
end