Sha256: 5da8b9d6d57ee756315fd3860ef7a3bf95ed6b5eb4fb8717eda6ad8eddc562fa

Contents?: true

Size: 331 Bytes

Versions: 2

Compression:

Stored size: 331 Bytes

Contents

#!/usr/bin/ruby
# Jonathan D. Stott <jonathan.stott@gmail.com>
require 'treetop'
require 'exalted_math/math'
require 'exalted_math/ast'

module Exalted
  class MathsParser
    def ast(text)
      result = parse(text)
      if result
        [true, result.ast]
      else
        [false, failure_reason]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
exalted_math-0.1.2 lib/exalted_math.rb
exalted_math-0.1.1 lib/exalted_math.rb