Class: Faust2Ruby::AST::Iteration

Inherits:
Node
  • Object
show all
Defined in:
lib/faust2ruby/ast.rb

Overview

Iteration: par(i, n, expr), seq(i, n, expr), etc.

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Constructor Details

#initialize(type, var, count, body, **opts) ⇒ Iteration

Returns a new instance of Iteration.



160
161
162
163
164
165
166
# File 'lib/faust2ruby/ast.rb', line 160

def initialize(type, var, count, body, **opts)
  super(**opts)
  @type = type  # :par, :seq, :sum, :prod
  @var = var
  @count = count
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



158
159
160
# File 'lib/faust2ruby/ast.rb', line 158

def body
  @body
end

#countObject (readonly)

Returns the value of attribute count.



158
159
160
# File 'lib/faust2ruby/ast.rb', line 158

def count
  @count
end

#typeObject (readonly)

Returns the value of attribute type.



158
159
160
# File 'lib/faust2ruby/ast.rb', line 158

def type
  @type
end

#varObject (readonly)

Returns the value of attribute var.



158
159
160
# File 'lib/faust2ruby/ast.rb', line 158

def var
  @var
end