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, else_line: nil, else_column: nil) ⇒ IfStmt

Returns a new instance of IfStmt.



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

def initialize(branches:, else_body:, inline: false, line: 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



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def branches
  @branches
end

#else_bodyObject (readonly)

Returns the value of attribute else_body

Returns:

  • (Object)

    the current value of else_body



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def else_body
  @else_body
end

#else_columnObject (readonly)

Returns the value of attribute else_column

Returns:

  • (Object)

    the current value of else_column



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def else_column
  @else_column
end

#else_lineObject (readonly)

Returns the value of attribute else_line

Returns:

  • (Object)

    the current value of else_line



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def else_line
  @else_line
end

#inlineObject (readonly)

Returns the value of attribute inline

Returns:

  • (Object)

    the current value of inline



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def inline
  @inline
end

#lineObject (readonly)

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



133
134
135
# File 'lib/milk_tea/core/ast.rb', line 133

def line
  @line
end