Class: Luoma::PrefixExpression

Inherits:
Expression show all
Defined in:
lib/luoma/expression.rb,
sig/luoma/expression.rbs

Direct Known Subclasses

NegExpression, NotExpression, PosExpression

Instance Attribute Summary

Attributes inherited from Expression

#span, #token

Instance Method Summary collapse

Methods inherited from Expression

#evaluate, #scope, #to_s

Constructor Details

#initialize(token, right) ⇒ PrefixExpression

(t_token, Expression) -> void

Parameters:



352
353
354
355
356
# File 'lib/luoma/expression.rb', line 352

def initialize(token, right)
  super(token)
  @right = right
  @span = Luoma.span(token, right.span)
end

Instance Method Details

#childrenObject



358
359
360
# File 'lib/luoma/expression.rb', line 358

def children
  [@right]
end