Class: Layo::Ast::Expression

Inherits:
Node
  • Object
show all
Defined in:
lib/layo/ast/expression.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, args = {}) ⇒ Expression

Returns a new instance of Expression.



5
6
7
8
# File 'lib/layo/ast/expression.rb', line 5

def initialize(type, args = {})
  @type = type
  super(args)
end

Instance Attribute Details

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/layo/ast/expression.rb', line 3

def type
  @type
end

Instance Method Details

#==(other) ⇒ Object



10
11
12
# File 'lib/layo/ast/expression.rb', line 10

def ==(other)
  @type == other.type && super(other)
end