Class: MilkTea::AST::WhenBranch

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pattern:, binding_name:, body:, binding_line: nil, binding_column: nil) ⇒ WhenBranch

Returns a new instance of WhenBranch.



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

def initialize(pattern:, binding_name:, body:, binding_line: nil, binding_column: nil) = super

Instance Attribute Details

#binding_columnObject (readonly)

Returns the value of attribute binding_column

Returns:

  • (Object)

    the current value of binding_column



149
150
151
# File 'lib/milk_tea/core/ast.rb', line 149

def binding_column
  @binding_column
end

#binding_lineObject (readonly)

Returns the value of attribute binding_line

Returns:

  • (Object)

    the current value of binding_line



149
150
151
# File 'lib/milk_tea/core/ast.rb', line 149

def binding_line
  @binding_line
end

#binding_nameObject (readonly)

Returns the value of attribute binding_name

Returns:

  • (Object)

    the current value of binding_name



149
150
151
# File 'lib/milk_tea/core/ast.rb', line 149

def binding_name
  @binding_name
end

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



149
150
151
# File 'lib/milk_tea/core/ast.rb', line 149

def body
  @body
end

#patternObject (readonly)

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



149
150
151
# File 'lib/milk_tea/core/ast.rb', line 149

def pattern
  @pattern
end