rubymotionlisp 1.0.0 → 1.0.1

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: 4a5e0c6cc93b15753596a1b9aa0c822b0b68c6a3
4
- data.tar.gz: 00eee04b22a3f97fed1247ccfd648344e52be820
3
+ metadata.gz: b3074241e3075cf4d98eec6369b5cbd3bb058cbf
4
+ data.tar.gz: 72d9f6f5bf0f315c633cbfd4d699859754d10baa
5
5
  SHA512:
6
- metadata.gz: 9c4ff7a0acfd6600aaf14a59d7a4ed1f3d44bf159f5058e0314637e475acfff5cef39dd2749d3f1f4ea33109d6bab6232762f5b8e7b29a81883b4afef893892e
7
- data.tar.gz: 4bcdc3a7c9b7af440ffe8c563c8e422b5e63724189b873eb0e39d12b4647332550349c67494e0892ace064bb67fd1856280713fb6612eceb0e0570af53d62850
6
+ metadata.gz: a76c421a87391c26b343dcc197edc8d927e091155364b56d2c6a31ce9f867ba3b718f833d42971df623d7f97d74b3d9830c7197b32abdd3a1e3cfcf3f891ad2f
7
+ data.tar.gz: bb78a4223e8466102a327fb5b0edf5ca901e6d9e7cb1dcdf3d41f3c0fc645dcb6a5a3876956a31bf0e40bdb67505aa4cf92b374e326221ead929025aa8fddec6
@@ -187,11 +187,12 @@ module Lisp
187
187
  end
188
188
 
189
189
  def traverse(path)
190
- return self if path.empty?
191
- next_cell = (path[0] == ?a) ? @car : @cdr
192
- return next_cell if path.length == 1
193
- return nil if next_cell.nil? || !next_cell.pair?
194
- next_cell.traverse(path[1..-1])
190
+ next_cell = self
191
+ path.chars.each do |p|
192
+ return nil if next_cell.nil? || !next_cell.pair?
193
+ next_cell = ((p == ?a) ? next_cell.car : next_cell.cdr)
194
+ end
195
+ next_cell
195
196
  end
196
197
 
197
198
  def method_missing(name, *args, &block)
@@ -3,7 +3,7 @@ module Lisp
3
3
  class EnvironmentFrame
4
4
 
5
5
  attr_accessor :frame, :current_code, :previous, :name
6
- attr_reader :parent
6
+ attr_reader :parent, :project_environment
7
7
 
8
8
  def self.global
9
9
  @@global_frame ||= EnvironmentFrame.new(nil, "GLOBAL")
@@ -25,6 +25,13 @@ module Lisp
25
25
  @current_code = []
26
26
  end
27
27
 
28
+
29
+ def clear
30
+ TopLevelEnvironments[@name] = nil if TopLevelEnvironments.has_key?(@name)
31
+ @bindings.keys.each {|k| @bindings[k] = nil}
32
+ end
33
+
34
+
28
35
  def has_frame?
29
36
  !@frame.nil?
30
37
  end
@@ -176,7 +176,7 @@ module Lisp
176
176
  return Lisp::Debug.process_error("Case requires non-atomic clauses", env)
177
177
  end
178
178
  end
179
- return nil
179
+ nil
180
180
  end
181
181
 
182
182
 
@@ -296,7 +296,7 @@ module Lisp
296
296
  advance
297
297
  end
298
298
  else
299
- return :ILLEGAL, ''
299
+ return :ILLEGAL, @current_ch
300
300
  end
301
301
  end
302
302
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubymotionlisp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Astels