Sha256: 6fba3c3cb03df4e3606bd28934c5a9df1dad33c78329ffa5b9c58ef76422f8bb

Contents?: true

Size: 714 Bytes

Versions: 2

Compression:

Stored size: 714 Bytes

Contents

# Use Dydx -> https://github.com/gogotanaka/dydx
require 'dydx'
include Dydx

require "qlang/version"
require 'qlang/lexer'
require 'qlang/parser'

require 'qlang/exec'

require 'qlang/q_on_irb'

require "kconv"

module Qlang
  # compiles into R as default.
  $type = :R

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

    def to_ruby
      $type = :Ruby
      Qlang
    end

    def to_r
      $type = :R
      Qlang
    end

    def to_haskell
      $type = :Hskl
      Qlang
    end

    def to_scala
      $type = :Scla
      Qlang
    end

    def to_java
      $type = :Scla
      Qlang
    end
  end
end

# Make alias as Q
Q = Qlang

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
qlang-0.0.14 lib/qlang.rb
qlang-0.0.1 lib/qlang.rb