module Calculator
Defined in:
calculator.crConstant Summary
-
VERSION =
"0.1.0"
Class Method Summary
- .apply_function(number, funcName)
- .calculate(n1, n2, operator)
- .calculate(input : String)
- .factorial(n : Int32)
-
.find_functions(input)
Finds functions; Returns the begin (inclusive), end (exclusive) and name as a Tuple The corresponding value in the HashMap is the priority
- .find_operators(input : String)
-
.function_children(func, functions, input)
Determines children and their position relative to their parent
- .gsub(input : String, hash : Hash(String | Regex, _))
- .is_number?(input : Char)
- .is_operator?(input : Char)
- .parse_number(input)
- .transform(input : String) : String
Class Method Detail
def self.find_functions(input)
#
Finds functions; Returns the begin (inclusive), end (exclusive) and name as a Tuple The corresponding value in the HashMap is the priority
def self.function_children(func, functions, input)
#
Determines children and their position relative to their parent