Class: Keisan::AST::Exponent

Inherits:
ArithmeticOperator show all
Defined in:
lib/keisan/ast/exponent.rb

Instance Attribute Summary

Attributes inherited from Parent

#children

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Operator

#initialize, #value

Methods inherited from Parent

#initialize

Methods inherited from Node

#value

Constructor Details

This class inherits a constructor from Keisan::AST::Operator

Class Method Details

.priorityObject



4
5
6
# File 'lib/keisan/ast/exponent.rb', line 4

def self.priority
  30
end

Instance Method Details

#arityObject



8
9
10
# File 'lib/keisan/ast/exponent.rb', line 8

def arity
  (2..2)
end

#associativityObject



12
13
14
# File 'lib/keisan/ast/exponent.rb', line 12

def associativity
  :right
end

#blank_valueObject



20
21
22
# File 'lib/keisan/ast/exponent.rb', line 20

def blank_value
  1
end

#symbolObject



16
17
18
# File 'lib/keisan/ast/exponent.rb', line 16

def symbol
  :**
end