Sha256: c6b7366679b60f5e70faa76028773acca74c13943b2b8224d2ccd3edda249a2f
Contents?: true
Size: 673 Bytes
Versions: 2
Compression:
Stored size: 673 Bytes
Contents
#! /usr/bin/env ruby require_relative '../lib/haxor' require 'optparse' parser = OptionParser.new do |opts| opts.banner = 'Usage: hvm [options] [file.hax.e]' opts.on_tail('-h', '--help', 'Show this message') do puts opts exit end opts.on_tail('-v', '--version', 'Show version') do puts "Haxor, version #{Haxor::Consts::GEM_VERSION}, version id #{Haxor::Consts::VERSION}." exit end end parser.parse! if ARGV[0].nil? puts 'You must specify .hax.e file to be run.' puts parser exit end vm = Haxor::Vm::Core.new filename = ARGV[0] # make life easier ;) filename += '.e' if filename.end_with? '.hax' vm.load_program filename vm.execute
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
haxor-0.3.0 | bin/hvm |
haxor-0.2.0 | bin/hvm |