Skip to main content
CrystalDocs
Search documentation
Search
Browse Docs
CrystalShards
About
class
AdvancedCalculator
Inherits
Reference
<
Object
Constants
PRECEDENCE = {"+" => 1, "-" => 1, "*" => 2, "/" => 2, "^" => 3}
Define operator precedence
Class methods
calculate
(expression :
String
)
Source
evaluate_postfix
(postfix_tokens)
Source
infix_to_postfix
(tokens)
Source
run
Source
tokenize
(expression :
String
)
Source