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

Defined in:

units/expression_parser.cr

Class Method Summary

Class Method Detail

def self.atom(mode : Mode = Mode::PrimaryCode) #

[View source]
def self.digits : Pars::Parser(Array(Char)) #

[View source]
def self.fixnum : Pars::Parser(Float64) #

[View source]
def self.integer : Pars::Parser(Int32) #

[View source]
def self.notation : Pars::Parser(String) #

[View source]
def self.number : Pars::Parser(Float64 | Int32) #

[View source]
def self.parse_expression(expression : String, mode : Mode = Mode::PrimaryCode) : Unit #

[View source]
def self.parse_term(term : String, mode : Mode, op : Operation) : Term #

ameba:disable Metrics/CyclomaticComplexity


[View source]
def self.prefix_name : Pars::Parser(String) #

[View source]
def self.prefix_primary : Pars::Parser(String) #

[View source]
def self.prefix_secondary : Pars::Parser(String) #

[View source]
def self.prefix_symbol : Pars::Parser(String) #

[View source]
def self.remaining_chars : Pars::Parser(String) #

[View source]
def self.sign : Pars::Parser(Array(Char)) #

[View source]