Class: Faust2Ruby::AST::CaseExpr

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

Overview

Case expression: case { (pattern) => expr; … } Each branch is a CaseBranch with pattern and result

Instance Attribute Summary collapse

Attributes inherited from Node

#column, #line

Instance Method Summary collapse

Constructor Details

#initialize(branches, **opts) ⇒ CaseExpr

Returns a new instance of CaseExpr.



298
299
300
301
# File 'lib/faust2ruby/ast.rb', line 298

def initialize(branches, **opts)
  super(**opts)
  @branches = branches
end

Instance Attribute Details

#branchesObject (readonly)

Returns the value of attribute branches.



296
297
298
# File 'lib/faust2ruby/ast.rb', line 296

def branches
  @branches
end