turmali 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6eb7aee973033aa6925875937fdca4a3f21e2902
4
- data.tar.gz: aad52d9f7be8d0ddadd844e2ce76ada0d4101ce1
3
+ metadata.gz: 3bdae014e300e60eb68a1f20dc534aac7f31aec3
4
+ data.tar.gz: c16d3da6a9a49a9f4dc4a7b1747b8bcdb872f60c
5
5
  SHA512:
6
- metadata.gz: 58d829d8755dbe10338c329b3279792b2171c062617d7b4d0b0ba61f76116eabe1663aa8d62371a24e4df581b0bf1cfbb46a09af85ed0fc00c8abdc15dbc799d
7
- data.tar.gz: c38c4b0fc63a18e38df086a312c0eecba03785527ce04d5fa3445becf933dcc548638c2b8492c013ff1da45f971c574aefdbec4708120ee4782de8e321424c32
6
+ metadata.gz: dc687309f0028eb254c9c588f47cadd3a9286ae478990758fc86b64bed984d48fed4232439fa2989ca87aed000253927cfa26adf8454e4a1bbd90a2c93ee8a87
7
+ data.tar.gz: 755d4de4134b7ef12c4453083f862005b4562038d04897a212b5ce32d3452dd7aa938f64081f9328f02d4f2550c975823fbe8ec77473b6ce2882feed590c46f5
data/bin/tml CHANGED
@@ -4,6 +4,7 @@ require "bundler/setup"
4
4
  require "turmali"
5
5
  require "readline"
6
6
  require "racc/parser"
7
+ require "terminal-table"
7
8
 
8
9
  stty_save = %x`stty -g`.chomp
9
10
  trap("INT") { system "stty", stty_save; exit }
@@ -13,7 +14,12 @@ interpreter = Interpreter.new
13
14
  if file = ARGV.first
14
15
  interpreter.eval File.read(file)
15
16
  else
16
- puts "Turmali (#{Turmali::VERSION}) REPL, Type 'quit' or 'exit' to exit"
17
+ rows = []
18
+ rows << ['', 'turmali repl console']
19
+ rows << ['filename(.tml)', 'run turmali file']
20
+ table = Terminal::Table.new :title => "Turmali (#{Turmali::VERSION}) REPL, Type 'quit' or 'exit' to exit",
21
+ :headings => ['arg', 'description'], :rows => rows
22
+ puts table
17
23
  begin
18
24
  while line = Readline::readline("tml >> ")
19
25
  exit if line == 'quit'
@@ -23,7 +29,8 @@ else
23
29
  puts "=> #{value.ruby_value.inspect}"
24
30
  end
25
31
  rescue Racc::ParseError => e
26
- puts e.inspect
27
- retry
32
+ puts e ; retry
33
+ rescue StandardError => e
34
+ puts e ; retry
28
35
  end
29
- end
36
+ end
@@ -13,7 +13,6 @@ class TurmaliClass < TurmaliObject
13
13
  def lookup(method_name)
14
14
  method = @runtime_methods[method_name]
15
15
  unless method
16
- puts "superclass #{@runtime_superclass}"
17
16
  if @runtime_superclass
18
17
  return @runtime_superclass.lookup(method_name)
19
18
  else
@@ -1,3 +1,3 @@
1
1
  module Turmali
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
data/turmali.gemspec CHANGED
@@ -30,6 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.executables = 'tml'
31
31
  spec.require_paths = ["lib"]
32
32
 
33
+ spec.add_dependency "terminal-table", "~> 1.8.0"
34
+
33
35
  spec.add_development_dependency "bundler", "~> 1.15"
34
36
  spec.add_development_dependency "rake", "~> 10.0"
35
37
  spec.add_development_dependency "rspec", "~> 3.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turmali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eiffel Qiu
@@ -10,6 +10,20 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: terminal-table
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.8.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.8.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: bundler
15
29
  requirement: !ruby/object:Gem::Requirement