class Unitwise::Expression::Parser
Parses a string expression into a hash tree representing the expression's terms, prefixes, and atoms.
Attributes
atom_matcher[R]
key[R]
metric_atom_matcher[R]
prefix_matcher[R]
Public Class Methods
new(key = :primary_code)
click to toggle source
# File lib/unitwise/expression/parser.rb, line 7 def initialize(key = :primary_code) @key = key @atom_matcher = Matcher.atom(key) @metric_atom_matcher = Matcher.metric_atom(key) @prefix_matcher = Matcher.prefix(key) end