Class: Baba::Expr::Assign

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, value) ⇒ Assign

Returns a new instance of Assign.



6
7
8
# File 'lib/baba/expr.rb', line 6

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/baba/expr.rb', line 4

def name
  @name
end

#valueObject (readonly)

Returns the value of attribute value.



4
5
6
# File 'lib/baba/expr.rb', line 4

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



10
11
12
# File 'lib/baba/expr.rb', line 10

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