Class: Skeem::SkmQuotation

Inherits:
SkmUnaryExpression show all
Defined in:
lib/skeem/skm_unary_expression.rb

Overview

class

Direct Known Subclasses

SkmQuasiquotation

Instance Attribute Summary

Attributes inherited from SkmUnaryExpression

#child

Attributes inherited from SkmElement

#position

Instance Method Summary collapse

Methods inherited from SkmUnaryExpression

#accept

Methods inherited from SkmElement

#accept, #boolean?, #bound!, #callable?, #char?, #complex?, #done!, #eqv?, #inspect, #integer?, #list?, #null?, #number?, #pair?, #procedure?, #quoted!, #rational?, #real?, #skm_eq?, #skm_equal?, #string?, #symbol?, #unquoted!, #vector?, #verbatim?

Constructor Details

#initialize(aDatum) ⇒ SkmQuotation

Returns a new instance of SkmQuotation.



30
31
32
# File 'lib/skeem/skm_unary_expression.rb', line 30

def initialize(aDatum)
  super(nil, aDatum)
end

Instance Method Details

#evaluate(_runtime) ⇒ Object



34
35
36
# File 'lib/skeem/skm_unary_expression.rb', line 34

def evaluate(_runtime)
  datum
end

#quasiquote(aRuntime) ⇒ Object



38
39
40
41
42
43
44
45
# File 'lib/skeem/skm_unary_expression.rb', line 38

def quasiquote(aRuntime)
  quasi_child = child.quasiquote(aRuntime)
  if quasi_child.equal?(child)
    self
  else
    self.class.new(quasi_child)
  end
end