rubylisp 1.0.3 → 1.0.7

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: 766ad09a55015bc092208b72f53402b9d937449a
4
- data.tar.gz: 3861fd772f1f62324bf636387c5cc8ba73ce89a6
3
+ metadata.gz: 5b93affab132db5c0e9bf534996928f4e6776a30
4
+ data.tar.gz: ccbee829606fe1643ab3a1f8ee9a9a994d73c844
5
5
  SHA512:
6
- metadata.gz: ec857ef3a5c1c82446acf3dffd9a0a90c2b355bf528b2c50e8aeb879b6eeeffd14566fa28bdbcedd272da3de746da3da6f503fecaa831fa08169330ad07c634c
7
- data.tar.gz: cebd6a7be2904d8f7390d5bd05162b5d92e7092fba83ee73e76945042c493674704af1f4aaad734fb215f78b2b72f7ad948e44d5cb12f9f8d31436ab5d4d7dea
6
+ metadata.gz: cc72c561b43fa6af68e15e5b6edae3963adb94ab3a56c2f6529f8eddfd56ae155f12a3bfd564016c40dd8a868ba4efdef73885a63f49930062a36d8c584cce31
7
+ data.tar.gz: fbd4d2548fc905bfeef54c46c1bca940dc3e6a4cc95e134627107680105454b5077295aa56cb25a82a9ce3fb61921f0011c9546a7f36fc7f10401c6656b117a4
@@ -173,6 +173,8 @@ module Lisp
173
173
  when :COMMAAT
174
174
  expr = parse_sexpr(tokens)
175
175
  return Lisp::ConsCell.array_to_list([Lisp::Symbol.named('unquote-splicing'), expr])
176
+ when :WHITESPACE
177
+ next
176
178
  when :ILLEGAL
177
179
  return Lisp::Debug.process_error("Illegal token: #{lit} on line #{tokens.line_number}", Lisp::EnvironmentFrame.global)
178
180
  else
@@ -24,6 +24,7 @@ module Lisp
24
24
  init
25
25
  end
26
26
 
27
+
27
28
  def advance
28
29
  if @source.eof?
29
30
  @eof = true
@@ -208,13 +209,16 @@ module Lisp
208
209
  def read_next_token
209
210
  return :EOF, '' if eof?
210
211
 
211
- while space?(@current_ch)
212
- @line_number += 1 if @current_ch == "\n"
213
- advance
214
- return :EOF, '' if eof?
215
- end
212
+ # while space?(@current_ch)
213
+ # @line_number += 1 if @current_ch == "\n"
214
+ # advance
215
+ # return :EOF, '' if eof?
216
+ # end
216
217
 
217
- if number?(@current_ch)
218
+ if space?(@current_ch)
219
+ advance
220
+ return :WHITESPACE, " "
221
+ elsif number?(@current_ch)
218
222
  return read_number(false)
219
223
  elsif @current_ch == '-' && number?(@next_ch)
220
224
  return read_number(false)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubylisp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Astels
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-10 00:00:00.000000000 Z
11
+ date: 2016-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander