Class: Baba::Stmt::Expression
- Inherits:
-
Object
- Object
- Baba::Stmt::Expression
- Defined in:
- lib/baba/stmt.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(expression) ⇒ Expression
constructor
A new instance of Expression.
Constructor Details
#initialize(expression) ⇒ Expression
Returns a new instance of Expression.
30 31 32 |
# File 'lib/baba/stmt.rb', line 30 def initialize(expression) @expression = expression end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
28 29 30 |
# File 'lib/baba/stmt.rb', line 28 def expression @expression end |
Instance Method Details
#accept(visitor) ⇒ Object
34 35 36 |
# File 'lib/baba/stmt.rb', line 34 def accept(visitor) visitor.visit_expression_stmt(self) end |