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, line: nil, column: nil) ⇒ WhenBranch

Returns a new instance of WhenBranch.



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

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

Instance Attribute Details

#binding_columnObject (readonly)

Returns the value of attribute binding_column

Returns:

  • (Object)

    the current value of binding_column



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def binding_column
  @binding_column
end

#binding_lineObject (readonly)

Returns the value of attribute binding_line

Returns:

  • (Object)

    the current value of binding_line



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def binding_line
  @binding_line
end

#binding_nameObject (readonly)

Returns the value of attribute binding_name

Returns:

  • (Object)

    the current value of binding_name



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def binding_name
  @binding_name
end

#bodyObject (readonly)

Returns the value of attribute body

Returns:

  • (Object)

    the current value of body



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def body
  @body
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def column
  @column
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def line
  @line
end

#patternObject (readonly)

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



165
166
167
# File 'lib/milk_tea/core/ast.rb', line 165

def pattern
  @pattern
end