Sha256: 594e451fb8cc5d97cfc397f562a27e4d645537c0d5f6b88817003694969047c9

Contents?: true

Size: 497 Bytes

Versions: 2

Compression:

Stored size: 497 Bytes

Contents

require 'json'

module IOSParser
  def self.lexer
    if const_defined?(:PureLexer)
      PureLexer
    else
      require_relative 'ios_parser/c_lexer'
      CLexer
    end
  end

  Lexer = lexer
end

require_relative 'ios_parser/ios'

module IOSParser
  class << self
    def parse(input)
      IOSParser::IOS.new.call(input)
    end

    def hash_to_ios(hash)
      IOSParser::IOS::Document.from_hash(hash)
    end

    def json_to_ios(text)
      hash_to_ios JSON.load(text)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ios_parser-0.3.1 lib/ios_parser.rb
ios_parser-0.3.0 lib/ios_parser.rb