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 +4 -4
- data/bin/tml +11 -4
- data/lib/turmali/runtime/class.rb +0 -1
- data/lib/turmali/version.rb +1 -1
- data/turmali.gemspec +2 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bdae014e300e60eb68a1f20dc534aac7f31aec3
|
4
|
+
data.tar.gz: c16d3da6a9a49a9f4dc4a7b1747b8bcdb872f60c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
27
|
-
|
32
|
+
puts e ; retry
|
33
|
+
rescue StandardError => e
|
34
|
+
puts e ; retry
|
28
35
|
end
|
29
|
-
end
|
36
|
+
end
|
data/lib/turmali/version.rb
CHANGED
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.
|
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
|