Class: Kapusta::Compiler::Language::IterationForm

Inherits:
Struct
  • Object
show all
Defined in:
lib/kapusta/compiler/language.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bindingsObject

Returns the value of attribute bindings

Returns:

  • (Object)

    the current value of bindings



58
59
60
# File 'lib/kapusta/compiler/language.rb', line 58

def bindings
  @bindings
end

#bodyObject

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



58
59
60
# File 'lib/kapusta/compiler/language.rb', line 58

def body
  @body
end

Instance Method Details

#binding_patsObject



63
# File 'lib/kapusta/compiler/language.rb', line 63

def binding_pats = items[0...-1] || []

#itemsObject



59
# File 'lib/kapusta/compiler/language.rb', line 59

def items = bindings.is_a?(Vec) ? bindings.items : []

#iter_exprObject



61
# File 'lib/kapusta/compiler/language.rb', line 61

def iter_expr = items.last