nydp 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Rakefile +3 -0
- data/lib/nydp/version.rb +1 -1
- data/lib/nydp.rb +16 -10
- data/lib/tasks/tests.rake +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33480122f9608ad9c13fe61c3ed534ce73765ddd
|
4
|
+
data.tar.gz: 27712f0e21be0cb53af53fb37bb8dc89c72c71fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4f0fb3458cf76450c64e19cddd0dc03633108aa45cc7d1f5a72fb546d446c7e0ea435e8dc913af54efaddbb707aae8ac588a0d0f2492415e0f00ca664da4fa2
|
7
|
+
data.tar.gz: 9cfd74432153243de497df5e50451248dc8ae0555a2032631243b102fc1af3358ba6734530ee55fd8d467cdbb49054e1b62a5de7c13bc9fa788bdea42a8a41a2
|
data/.gitignore
CHANGED
data/Rakefile
CHANGED
data/lib/nydp/version.rb
CHANGED
data/lib/nydp.rb
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
module Nydp
|
2
|
+
LOADFILES = []
|
3
|
+
|
4
|
+
def self.rake_tasks
|
5
|
+
load relative_path 'tasks/tests.rake'
|
6
|
+
end
|
7
|
+
|
8
|
+
def self.relative_path name
|
9
|
+
File.join File.expand_path(File.dirname(__FILE__)), name
|
10
|
+
end
|
11
|
+
|
12
|
+
LOADFILES << relative_path('lisp/boot.nydp')
|
13
|
+
LOADFILES << relative_path('lisp/test-runner.nydp')
|
14
|
+
Dir.glob(relative_path 'lisp/tests/**/*.nydp').each { |f| LOADFILES << f }
|
15
|
+
|
2
16
|
def self.compile_and_eval vm, expr
|
3
17
|
vm.thread Pair.new(Compiler.compile(expr, Nydp.NIL), Nydp.NIL)
|
4
18
|
end
|
@@ -104,8 +118,7 @@ module Nydp
|
|
104
118
|
root_ns = { }
|
105
119
|
setup(root_ns)
|
106
120
|
vm = VM.new
|
107
|
-
|
108
|
-
StreamRunner.new(vm, root_ns, File.new(boot_path)).run
|
121
|
+
LOADFILES.each { |f| StreamRunner.new(vm, root_ns, File.new(f)).run }
|
109
122
|
Repl.new(vm, root_ns, $stdin).run
|
110
123
|
end
|
111
124
|
|
@@ -114,14 +127,7 @@ module Nydp
|
|
114
127
|
root_ns = { }
|
115
128
|
setup(root_ns)
|
116
129
|
vm = VM.new
|
117
|
-
|
118
|
-
test_runner_path = File.join File.expand_path(File.dirname(__FILE__)), 'lisp/test-runner.nydp'
|
119
|
-
tests = Dir.glob(File.join File.expand_path(File.dirname(__FILE__)), 'lisp/tests/**/*.nydp')
|
120
|
-
StreamRunner.new(vm, root_ns, File.new(boot_path)).run
|
121
|
-
StreamRunner.new(vm, root_ns, File.new(test_runner_path)).run
|
122
|
-
tests.each do |tst|
|
123
|
-
StreamRunner.new(vm, root_ns, File.new(tst)).run
|
124
|
-
end
|
130
|
+
LOADFILES.each { |f| StreamRunner.new(vm, root_ns, File.new(f)).run }
|
125
131
|
StreamRunner.new(vm, root_ns, "(run-all-tests)").run
|
126
132
|
end
|
127
133
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nydp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Conan Dalton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -134,6 +134,7 @@ files:
|
|
134
134
|
- lib/nydp/truth.rb
|
135
135
|
- lib/nydp/version.rb
|
136
136
|
- lib/nydp/vm.rb
|
137
|
+
- lib/tasks/tests.rake
|
137
138
|
- nydp.gemspec
|
138
139
|
- spec/boot_spec.rb
|
139
140
|
- spec/embedded_spec.rb
|