Class: Collie::AST::UnionDeclaration

Inherits:
Object
  • Object
show all
Defined in:
lib/collie/ast.rb

Overview

Union declaration node (%union)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(body:, location: nil) ⇒ UnionDeclaration



81
82
83
84
# File 'lib/collie/ast.rb', line 81

def initialize(body:, location: nil)
  @body = body
  @location = location
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



79
80
81
# File 'lib/collie/ast.rb', line 79

def body
  @body
end

#locationObject

Returns the value of attribute location.



79
80
81
# File 'lib/collie/ast.rb', line 79

def location
  @location
end