Class: MilkTea::AST::WhenStmt

Inherits:
Data
  • Object
show all
Defined in:
lib/milk_tea/core/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(discriminant:, branches:, else_body:, line: nil, column: nil, length: nil) ⇒ WhenStmt

Returns a new instance of WhenStmt.



169
# File 'lib/milk_tea/core/ast.rb', line 169

def initialize(discriminant:, branches:, else_body:, line: nil, column: nil, length: nil) = super

Instance Attribute Details

#branchesObject (readonly)

Returns the value of attribute branches

Returns:

  • (Object)

    the current value of branches



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def branches
  @branches
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def column
  @column
end

#discriminantObject (readonly)

Returns the value of attribute discriminant

Returns:

  • (Object)

    the current value of discriminant



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def discriminant
  @discriminant
end

#else_bodyObject (readonly)

Returns the value of attribute else_body

Returns:

  • (Object)

    the current value of else_body



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def else_body
  @else_body
end

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



168
169
170
# File 'lib/milk_tea/core/ast.rb', line 168

def line
  @line
end