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.



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

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



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def branches
  @branches
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def column
  @column
end

#discriminantObject (readonly)

Returns the value of attribute discriminant

Returns:

  • (Object)

    the current value of discriminant



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def discriminant
  @discriminant
end

#else_bodyObject (readonly)

Returns the value of attribute else_body

Returns:

  • (Object)

    the current value of else_body



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def else_body
  @else_body
end

#lengthObject (readonly)

Returns the value of attribute length

Returns:

  • (Object)

    the current value of length



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def length
  @length
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



152
153
154
# File 'lib/milk_tea/core/ast.rb', line 152

def line
  @line
end