nil 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/Gemfile +2 -0
- data/bin/nil +20 -3
- data/lib/nil/version.rb +1 -1
- data/nil.gemspec +2 -0
- metadata +18 -2
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/bin/nil
CHANGED
@@ -1,14 +1,31 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'nil'
|
4
|
+
require 'trollop'
|
4
5
|
|
5
|
-
|
6
|
+
opts = Trollop::options do
|
7
|
+
version "nil #{Nil::VERSION} (c) 2012 wxl"
|
8
|
+
banner <<-EOS
|
9
|
+
nil is a brain**** macro compiler and interpreter
|
10
|
+
|
11
|
+
Usage:
|
12
|
+
nil [options] <filename>
|
13
|
+
|
14
|
+
where [options] are:
|
15
|
+
EOS
|
16
|
+
|
17
|
+
opt :compile_only, "Output compiled Ruby code to standard output instead of running it."
|
18
|
+
end
|
6
19
|
|
20
|
+
code = ARGF.read
|
7
21
|
mp = Nil::MacroParser.new
|
8
22
|
code = mp.parse code
|
9
|
-
|
10
23
|
i = Nil::Interpreter.new
|
11
|
-
|
12
24
|
i.compile code
|
13
25
|
|
26
|
+
if opts[:compile_only]
|
27
|
+
puts i.compiled_ruby
|
28
|
+
exit
|
29
|
+
end
|
30
|
+
|
14
31
|
i.run
|
data/lib/nil/version.rb
CHANGED
data/nil.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,23 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
date: 2012-05-31 00:00:00.000000000 Z
|
13
|
-
dependencies:
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: trollop
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description: A brain**** macro language and interpreter
|
15
31
|
email:
|
16
32
|
- wuffers.lightwolf@me.com
|