Class: MilkTea::AST::IfStmt

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(branches:, else_body:, inline: false, line: nil, column: nil, else_line: nil, else_column: nil) ⇒ IfStmt

Returns a new instance of IfStmt.



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

def initialize(branches:, else_body:, inline: false, line: nil, column: nil, else_line: nil, else_column: nil) = super

Instance Attribute Details

#branchesObject (readonly)

Returns the value of attribute branches

Returns:

  • (Object)

    the current value of branches



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def branches
  @branches
end

#columnObject (readonly)

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def column
  @column
end

#else_bodyObject (readonly)

Returns the value of attribute else_body

Returns:

  • (Object)

    the current value of else_body



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def else_body
  @else_body
end

#else_columnObject (readonly)

Returns the value of attribute else_column

Returns:

  • (Object)

    the current value of else_column



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def else_column
  @else_column
end

#else_lineObject (readonly)

Returns the value of attribute else_line

Returns:

  • (Object)

    the current value of else_line



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def else_line
  @else_line
end

#inlineObject (readonly)

Returns the value of attribute inline

Returns:

  • (Object)

    the current value of inline



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def inline
  @inline
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



147
148
149
# File 'lib/milk_tea/core/ast.rb', line 147

def line
  @line
end