Module: Procedo::Formula

Defined in:
lib/procedo/formula.rb,
lib/procedo/formula/nodes.rb,
lib/procedo/formula/parser.rb,
lib/procedo/formula/language.rb,
lib/procedo/formula/syntax_error.rb

Defined Under Namespace

Modules: Language, Nodes Classes: LanguageParser, Parser, SyntaxError

Class Method Summary collapse

Class Method Details

.parse(text, options = {}) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/procedo/formula.rb', line 4

def parse(text, options = {})
  @@parser ||= ::Procedo::Formula::Parser.new
  unless tree = @@parser.parse(text.to_s, options)
    raise ::Procedo::Formula::SyntaxError, @@parser
  end
  tree
end