nil 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # 1.0.7
2
+ - REALLY fix that bug.
3
+
4
+ # 1.0.6
5
+ - Fix a bug in modes (or so I think)
6
+
7
+ # 1.0.5
8
+ - Add modes
9
+
1
10
  # 1.0.4
2
11
  - Fix bug with brackets in subroutines
3
12
 
data/bin/nil CHANGED
@@ -21,7 +21,7 @@ code = ARGF.read
21
21
  mp = Nil::MacroParser.new
22
22
  code = mp.parse code
23
23
  i = Nil::Interpreter.new
24
- i.compile code, Nil::Interpreter.mode
24
+ i.compile code, mp.mode
25
25
 
26
26
  if opts[:compile_only]
27
27
  puts i.compiled_ruby
data/lib/nil/macro.rb CHANGED
@@ -3,6 +3,7 @@ module Nil
3
3
  attr_accessor :original_code, :compiled_code, :mode
4
4
 
5
5
  def initialize
6
+ @mode = 'ascii'
6
7
  end
7
8
 
8
9
  def compile_subroutines(code)
@@ -28,7 +29,7 @@ module Nil
28
29
 
29
30
  def interpret_mode_definition(code)
30
31
  code.match /\.mode\((ascii|num)\)/i do |m|
31
- $1 == 'num' ? Nil::Interpreter.mode = 'num' : Nil::Interpreter.mode = 'ascii'
32
+ $1 == 'num' ? @mode = 'num' : @mode = 'ascii'
32
33
  end
33
34
  code.gsub(/\.mode\((ascii|num)\)/i, '')
34
35
  end
data/lib/nil/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nil
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
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.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: