Class: Dentaku::AST::Modulo
Constant Summary
Constants inherited
from Arithmetic
Arithmetic::DECIMAL, Arithmetic::INTEGER
Instance Attribute Summary
Attributes inherited from Operation
#left, #right
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Arithmetic
#initialize, #type, #value
Methods inherited from Operation
#accept, #dependencies, #display_operator, #initialize, max_param_count, min_param_count, right_associative?
Methods inherited from Node
#dependencies, #name, #type
Class Method Details
.arity ⇒ Object
181
182
183
|
# File 'lib/dentaku/ast/arithmetic.rb', line 181
def self.arity
2
end
|
.precedence ⇒ Object
185
186
187
|
# File 'lib/dentaku/ast/arithmetic.rb', line 185
def self.precedence
20
end
|
.resolve_class(next_token) ⇒ Object
189
190
191
|
# File 'lib/dentaku/ast/arithmetic.rb', line 189
def self.resolve_class(next_token)
next_token.nil? || next_token.operator? || next_token.close? ? Percentage : self
end
|
Instance Method Details
#operator ⇒ Object
193
194
195
|
# File 'lib/dentaku/ast/arithmetic.rb', line 193
def operator
:%
end
|