Sha256: 8dbb97188c1bf882b9ac39df86320465b569c4e361c436d1c8ea3acb68889499

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 Bytes

Contents

# Ruby stlib
require 'kconv'
require 'matrix'
require 'singleton'
require 'yaml'

$:.unshift(File.dirname(__FILE__))
# Q core
require 'hilbert/meta_info'
require 'hilbert/utils/ruby_ext'
require 'hilbert/lexer'
require 'hilbert/parser'

module Hilbert
  $meta_info = MetaInfo.instance

  class << self

    def compile(str)
      lexed = Lexer.execute(str)
      Kconv.tosjis(Parser.execute(lexed))
    end

    $meta_info.langs_hash.keys.each do |lang_name|
      define_method("to_#{lang_name}") do |*opts|
        $meta_info.lang = lang_name.to_sym
        $meta_info.opts = opts
        Hilbert
      end
    end

  end

end

# Make alias as Q
Q = Hilbert

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hilbert-0.0.2700001 lib/hilbert.rb