module Units::ExpressionParser
Overview
NOTE : we reverse expressions for parsing to deal with optional prefixes as a prefix symbol can match an atoms symbol, this way atoms are matched first
Included Modules
- Pars
Defined in:
units/expression_parser.crClass Method Summary
- .atom(mode : Mode = Mode::PrimaryCode)
- .digits : Pars::Parser(Array(Char))
- .fixnum : Pars::Parser(Float64)
- .integer : Pars::Parser(Int32)
- .notation : Pars::Parser(String)
- .number : Pars::Parser(Float64 | Int32)
- .parse_expression(expression : String, mode : Mode = Mode::PrimaryCode) : Unit
-
.parse_term(term : String, mode : Mode, op : Operation) : Term
ameba:disable Metrics/CyclomaticComplexity
- .prefix_name : Pars::Parser(String)
- .prefix_primary : Pars::Parser(String)
- .prefix_secondary : Pars::Parser(String)
- .prefix_symbol : Pars::Parser(String)
- .remaining_chars : Pars::Parser(String)
- .sign : Pars::Parser(Array(Char))
Class Method Detail
ameba:disable Metrics/CyclomaticComplexity