Class: Baba::Stmt::Return

Inherits:
Object
  • Object
show all
Defined in:
lib/baba/stmt.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(keyword, value) ⇒ Return

Returns a new instance of Return.



90
91
92
# File 'lib/baba/stmt.rb', line 90

def initialize(keyword, value)
  @keyword = keyword; @value = value
end

Instance Attribute Details

#keywordObject (readonly)

Returns the value of attribute keyword.



88
89
90
# File 'lib/baba/stmt.rb', line 88

def keyword
  @keyword
end

#valueObject (readonly)

Returns the value of attribute value.



88
89
90
# File 'lib/baba/stmt.rb', line 88

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



94
95
96
# File 'lib/baba/stmt.rb', line 94

def accept(visitor)
  visitor.visit_return_stmt(self)
end