rubymotionlisp 0.2.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +129 -2
- data/lib/rubylisp/atom.rb +25 -6
- data/lib/rubylisp/boolean.rb +9 -6
- data/lib/rubylisp/builtins.rb +33 -0
- data/lib/rubylisp/character.rb +14 -275
- data/lib/rubylisp/class_object.rb +56 -0
- data/lib/rubylisp/cons_cell.rb +50 -20
- data/lib/rubylisp/environment.rb +27 -0
- data/lib/rubylisp/environment_frame.rb +24 -6
- data/lib/rubylisp/eof_object.rb +26 -0
- data/lib/rubylisp/exception.rb +61 -61
- data/lib/rubylisp/ext.rb +32 -6
- data/lib/rubylisp/ffi_new.rb +2 -1
- data/lib/rubylisp/ffi_send.rb +15 -5
- data/lib/rubylisp/frame.rb +5 -164
- data/lib/rubylisp/function.rb +4 -3
- data/lib/rubylisp/macro.rb +13 -8
- data/lib/rubylisp/{object.rb → native_object.rb} +0 -15
- data/lib/rubylisp/number.rb +5 -0
- data/lib/rubylisp/parser.rb +81 -52
- data/lib/rubylisp/port.rb +27 -0
- data/lib/rubylisp/prim_alist.rb +115 -0
- data/lib/rubylisp/prim_assignment.rb +61 -0
- data/lib/rubylisp/prim_character.rb +273 -0
- data/lib/rubylisp/{ffi_class.rb → prim_class_object.rb} +16 -69
- data/lib/rubylisp/prim_environment.rb +203 -0
- data/lib/rubylisp/prim_equivalence.rb +93 -0
- data/lib/rubylisp/prim_frame.rb +166 -0
- data/lib/rubylisp/prim_io.rb +266 -0
- data/lib/rubylisp/prim_list_support.rb +496 -0
- data/lib/rubylisp/{logical.rb → prim_logical.rb} +9 -14
- data/lib/rubylisp/prim_math.rb +397 -0
- data/lib/rubylisp/prim_native_object.rb +21 -0
- data/lib/rubylisp/prim_relational.rb +42 -0
- data/lib/rubylisp/{special_forms.rb → prim_special_forms.rb} +97 -84
- data/lib/rubylisp/prim_string.rb +792 -0
- data/lib/rubylisp/prim_system.rb +55 -0
- data/lib/rubylisp/prim_type_checks.rb +58 -0
- data/lib/rubylisp/prim_vector.rb +497 -0
- data/lib/rubylisp/primitive.rb +51 -6
- data/lib/rubylisp/string.rb +4 -803
- data/lib/rubylisp/symbol.rb +0 -1
- data/lib/rubylisp/tokenizer.rb +160 -136
- data/lib/rubylisp/vector.rb +10 -31
- data/lib/rubymotion/debug.rb +40 -0
- data/lib/rubymotion/require-fix.rb +1 -0
- data/lib/rubymotionlisp.rb +4 -0
- metadata +28 -17
- data/lib/rubylisp/alist.rb +0 -230
- data/lib/rubylisp/assignment.rb +0 -65
- data/lib/rubylisp/equivalence.rb +0 -118
- data/lib/rubylisp/io.rb +0 -74
- data/lib/rubylisp/list_support.rb +0 -526
- data/lib/rubylisp/math.rb +0 -405
- data/lib/rubylisp/motion_builtins.rb +0 -31
- data/lib/rubylisp/relational.rb +0 -46
- data/lib/rubylisp/system.rb +0 -20
- data/lib/rubylisp/testing.rb +0 -136
- data/lib/rubylisp/type_checks.rb +0 -60
data/lib/rubylisp/symbol.rb
CHANGED
data/lib/rubylisp/tokenizer.rb
CHANGED
@@ -4,27 +4,60 @@ module Lisp
|
|
4
4
|
|
5
5
|
attr_reader :line_number
|
6
6
|
|
7
|
+
def self.from_string(str)
|
8
|
+
self.new(StringIO.new(str, "r"))
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.from_file(f)
|
12
|
+
self.new(f)
|
13
|
+
end
|
14
|
+
|
7
15
|
def initialize(src)
|
8
|
-
@lookahead_token = 0
|
9
|
-
@lookahead_literal = ''
|
10
16
|
@source = src
|
11
|
-
@
|
17
|
+
@lookahead_token = nil
|
18
|
+
@lookahead_literal = ''
|
19
|
+
@eof = false
|
20
|
+
@almost_eof = false
|
21
|
+
@curent_ch = nil
|
22
|
+
@next_ch = nil
|
23
|
+
@next_next_ch = nil
|
24
|
+
init
|
12
25
|
end
|
13
26
|
|
27
|
+
def advance
|
28
|
+
if @source.eof?
|
29
|
+
@eof = true
|
30
|
+
@almost_eof = true
|
31
|
+
@current_ch = nil
|
32
|
+
@next_ch = nil
|
33
|
+
else
|
34
|
+
@current_ch = @source.readchar
|
35
|
+
if @source.eof?
|
36
|
+
@almost_eof = true
|
37
|
+
@next_ch = nil
|
38
|
+
else
|
39
|
+
@next_ch = @source.readchar
|
40
|
+
if @source.eof?
|
41
|
+
@next_next_ch = nil
|
42
|
+
else
|
43
|
+
@next_next_ch = @source.readchar
|
44
|
+
@source.ungetc(@next_next_ch)
|
45
|
+
end
|
46
|
+
@source.ungetc(@next_ch)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
14
51
|
def next_token
|
15
52
|
return @lookahead_token, @lookahead_literal
|
16
53
|
end
|
17
54
|
|
18
55
|
def eof?
|
19
|
-
@
|
56
|
+
@eof
|
20
57
|
end
|
21
58
|
|
22
59
|
def almost_eof?
|
23
|
-
@
|
24
|
-
end
|
25
|
-
|
26
|
-
def next_char
|
27
|
-
almost_eof? ? nil : @source[@position + 1]
|
60
|
+
@almost_eof
|
28
61
|
end
|
29
62
|
|
30
63
|
def letter?(ch)
|
@@ -40,7 +73,7 @@ module Lisp
|
|
40
73
|
end
|
41
74
|
|
42
75
|
def number?(ch)
|
43
|
-
digit?(ch) || (ch == '-' && digit?(
|
76
|
+
digit?(ch) || (ch == '-' && digit?(@next_ch))
|
44
77
|
end
|
45
78
|
|
46
79
|
|
@@ -49,50 +82,55 @@ module Lisp
|
|
49
82
|
end
|
50
83
|
|
51
84
|
|
85
|
+
def graph?(ch)
|
86
|
+
ch =~ /[[:graph:]]/
|
87
|
+
end
|
88
|
+
|
89
|
+
|
52
90
|
def symbol_character?(ch)
|
53
|
-
|
54
|
-
return true if (?0..?9).include?(ch)
|
55
|
-
return "-_?!:*=<>".include?(ch)
|
91
|
+
graph?(ch) && !("();\"'`|[]{}#,.".include?(ch))
|
56
92
|
end
|
57
93
|
|
58
94
|
def read_symbol
|
59
|
-
|
95
|
+
lit = ""
|
60
96
|
tok = nil
|
61
|
-
if @
|
62
|
-
|
97
|
+
if @current_ch == '.'
|
98
|
+
lit << @current_ch
|
99
|
+
advance
|
63
100
|
tok = :FFI_SEND_SYMBOL
|
64
101
|
end
|
65
102
|
|
66
|
-
while !eof? && (symbol_character?(@
|
67
|
-
(@
|
68
|
-
(
|
69
|
-
tok ||= :FFI_NEW_SYMBOL if @
|
70
|
-
tok = :FFI_STATIC_SYMBOL if @
|
71
|
-
|
103
|
+
while !eof? && ((@current_ch == '.' && !symbol_character?(@next_ch) && tok.nil?) ||
|
104
|
+
(@current_ch == '/' && symbol_character?(@next_ch)) ||
|
105
|
+
(symbol_character?(@current_ch)))
|
106
|
+
tok ||= :FFI_NEW_SYMBOL if @current_ch == '.' && !lit.empty?
|
107
|
+
tok = :FFI_STATIC_SYMBOL if @current_ch == '/' && !lit.empty?
|
108
|
+
lit << @current_ch
|
109
|
+
advance
|
72
110
|
end
|
73
111
|
|
74
112
|
tok ||= :SYMBOL
|
75
113
|
return tok, case tok
|
76
114
|
when :SYMBOL, :FFI_STATIC_SYMBOL
|
77
|
-
|
115
|
+
lit
|
78
116
|
when :FFI_SEND_SYMBOL
|
79
|
-
|
117
|
+
lit[1..-1]
|
80
118
|
when :FFI_NEW_SYMBOL
|
81
|
-
|
119
|
+
lit[0..-2]
|
82
120
|
end
|
83
121
|
end
|
84
122
|
|
85
|
-
def read_number
|
86
|
-
|
87
|
-
|
88
|
-
|
123
|
+
def read_number(hex)
|
124
|
+
lit = ""
|
125
|
+
if @current_ch == '-'
|
126
|
+
lit << @current_ch
|
127
|
+
advance
|
128
|
+
end
|
89
129
|
is_float = false
|
90
|
-
@
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
@position += 1
|
95
|
-
ch = @source[@position]
|
130
|
+
while !eof? && (digit?(@current_ch) || (hex && hex?(@current_ch)) || (!hex && !is_float && @current_ch == '.'))
|
131
|
+
is_float ||= !hex && (@current_ch == '.')
|
132
|
+
lit << @current_ch
|
133
|
+
advance
|
96
134
|
end
|
97
135
|
|
98
136
|
tok = if hex
|
@@ -103,7 +141,7 @@ module Lisp
|
|
103
141
|
:NUMBER
|
104
142
|
end
|
105
143
|
|
106
|
-
return tok,
|
144
|
+
return tok, lit
|
107
145
|
end
|
108
146
|
|
109
147
|
|
@@ -111,15 +149,15 @@ module Lisp
|
|
111
149
|
i = 0
|
112
150
|
processed_str = ""
|
113
151
|
while i < str.length
|
114
|
-
if str[i] ==
|
152
|
+
if str[i] == '\\'
|
115
153
|
processed_str << if i < (str.length - 1)
|
116
154
|
i += 1
|
117
155
|
case (str[i])
|
118
|
-
when
|
156
|
+
when 'n'
|
119
157
|
"\n"
|
120
|
-
when
|
158
|
+
when 't'
|
121
159
|
"\t"
|
122
|
-
when
|
160
|
+
when '\\'
|
123
161
|
"\\"
|
124
162
|
else
|
125
163
|
"\\#{str[i]}"
|
@@ -137,15 +175,15 @@ module Lisp
|
|
137
175
|
|
138
176
|
|
139
177
|
def read_string
|
140
|
-
|
141
|
-
@
|
142
|
-
|
143
|
-
|
178
|
+
lit = ""
|
179
|
+
while !eof? && @current_ch != '"'
|
180
|
+
lit << @current_ch
|
181
|
+
advance
|
144
182
|
end
|
145
183
|
|
146
184
|
return :EOF, '' if eof?
|
147
|
-
|
148
|
-
return :STRING, process_escapes(
|
185
|
+
advance
|
186
|
+
return :STRING, process_escapes(lit)
|
149
187
|
end
|
150
188
|
|
151
189
|
|
@@ -155,122 +193,107 @@ module Lisp
|
|
155
193
|
|
156
194
|
|
157
195
|
def read_character
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
while !eof? && !divider?(@
|
162
|
-
|
196
|
+
lit = ""
|
197
|
+
lit << @current_ch
|
198
|
+
advance
|
199
|
+
while !eof? && !divider?(@current_ch)
|
200
|
+
lit << @current_ch
|
201
|
+
advance
|
163
202
|
end
|
164
203
|
|
165
|
-
return :CHARACTER,
|
204
|
+
return :CHARACTER, lit
|
166
205
|
end
|
167
206
|
|
168
207
|
|
169
208
|
def read_next_token
|
170
209
|
return :EOF, '' if eof?
|
171
210
|
|
172
|
-
while space?(@
|
173
|
-
@line_number += 1 if @
|
174
|
-
|
211
|
+
while space?(@current_ch)
|
212
|
+
@line_number += 1 if @current_ch == "\n"
|
213
|
+
advance
|
175
214
|
return :EOF, '' if eof?
|
176
215
|
end
|
177
216
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
return read_number
|
189
|
-
elsif current_ch == ?"
|
217
|
+
if number?(@current_ch)
|
218
|
+
return read_number(false)
|
219
|
+
elsif @current_ch == '-' && number?(@next_ch)
|
220
|
+
return read_number(false)
|
221
|
+
elsif @current_ch == '#' && @next_ch == 'x'
|
222
|
+
advance
|
223
|
+
advance
|
224
|
+
return read_number(true)
|
225
|
+
elsif @current_ch == '"'
|
226
|
+
advance
|
190
227
|
return read_string
|
191
|
-
elsif current_ch ==
|
228
|
+
elsif @current_ch == '#' && @next_ch == '\\'
|
229
|
+
advance
|
230
|
+
advance
|
192
231
|
return read_character
|
193
|
-
elsif current_ch ==
|
194
|
-
|
232
|
+
elsif @current_ch == '\'' && @next_ch == '{'
|
233
|
+
advance
|
234
|
+
advance
|
235
|
+
return :QUOTE_LBRACE, "'{"
|
236
|
+
elsif @current_ch == '\'' && @next_ch == '#' && @next_next_ch == '('
|
237
|
+
advance
|
238
|
+
advance
|
239
|
+
advance
|
240
|
+
return :QUOTE_HASH_LPAREN, "'#("
|
241
|
+
elsif @current_ch == '\''
|
242
|
+
advance
|
195
243
|
return :QUOTE, "'"
|
196
|
-
elsif current_ch ==
|
197
|
-
|
244
|
+
elsif @current_ch == '`'
|
245
|
+
advance
|
198
246
|
return :BACKQUOTE, "`"
|
199
|
-
elsif current_ch ==
|
200
|
-
|
247
|
+
elsif @current_ch == ',' && @next_ch == '@'
|
248
|
+
advance
|
249
|
+
advance
|
201
250
|
return :COMMAAT, ",@"
|
202
|
-
elsif current_ch ==
|
203
|
-
|
251
|
+
elsif @current_ch == ','
|
252
|
+
advance
|
204
253
|
return :COMMA, ","
|
205
|
-
elsif current_ch ==
|
206
|
-
|
254
|
+
elsif @current_ch == '('
|
255
|
+
advance
|
207
256
|
return :LPAREN, "("
|
208
|
-
elsif current_ch ==
|
209
|
-
|
257
|
+
elsif @current_ch == '#' && @next_ch == '('
|
258
|
+
advance
|
259
|
+
advance
|
260
|
+
return :HASH_LPAREN, "#("
|
261
|
+
elsif @current_ch == ')'
|
262
|
+
advance
|
210
263
|
return :RPAREN, ")"
|
211
|
-
elsif current_ch ==
|
212
|
-
|
264
|
+
elsif @current_ch == '{'
|
265
|
+
advance
|
213
266
|
return :LBRACE, "{"
|
214
|
-
elsif current_ch ==
|
215
|
-
|
267
|
+
elsif @current_ch == '}'
|
268
|
+
advance
|
216
269
|
return :RBRACE, "}"
|
217
|
-
elsif current_ch ==
|
218
|
-
|
270
|
+
elsif @current_ch == '['
|
271
|
+
advance
|
219
272
|
return :LBRACKET, "["
|
220
|
-
elsif current_ch ==
|
221
|
-
|
273
|
+
elsif @current_ch == ']'
|
274
|
+
advance
|
222
275
|
return :RBRACKET, "]"
|
223
|
-
elsif current_ch ==
|
224
|
-
|
276
|
+
elsif @current_ch == '.' && space?(@next_ch)
|
277
|
+
advance
|
225
278
|
return :PERIOD, "."
|
226
|
-
elsif current_ch ==
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
@
|
231
|
-
|
232
|
-
|
233
|
-
@position += 2
|
234
|
-
return :SYMBOL, "=>"
|
235
|
-
elsif "+-*/%".include?(current_ch)
|
236
|
-
@position += 1
|
237
|
-
return :SYMBOL, current_ch.to_s
|
238
|
-
elsif current_ch == ?< && next_ch == ?=
|
239
|
-
@position += 2
|
240
|
-
return :SYMBOL, "<="
|
241
|
-
elsif current_ch == ?<
|
242
|
-
@position += 1
|
243
|
-
return :SYMBOL, "<"
|
244
|
-
elsif current_ch == ?> && next_ch == ?=
|
245
|
-
@position += 2
|
246
|
-
return :SYMBOL, ">="
|
247
|
-
elsif current_ch == ?>
|
248
|
-
@position += 1
|
249
|
-
return :SYMBOL, ">"
|
250
|
-
elsif current_ch == ?= && next_ch == ?=
|
251
|
-
@position += 2
|
252
|
-
return :SYMBOL, "="
|
253
|
-
elsif current_ch == ?=
|
254
|
-
@position += 1
|
255
|
-
return :SYMBOL, "="
|
256
|
-
elsif current_ch == ?! && next_ch == ?=
|
257
|
-
@position += 2
|
258
|
-
return :SYMBOL, "!="
|
259
|
-
elsif current_ch == ?!
|
260
|
-
@position += 1
|
261
|
-
return :SYMBOL, "!"
|
262
|
-
elsif current_ch == ?# && next_ch == ?t
|
263
|
-
@position += 2
|
279
|
+
elsif @current_ch == '.' && symbol_character?(@next_ch)
|
280
|
+
return read_symbol
|
281
|
+
elsif symbol_character?(@current_ch)
|
282
|
+
return read_symbol
|
283
|
+
elsif @current_ch == '#' && @next_ch == 't'
|
284
|
+
advance
|
285
|
+
advance
|
264
286
|
return :TRUE, "#t"
|
265
|
-
elsif current_ch ==
|
266
|
-
|
287
|
+
elsif @current_ch == '#' && @next_ch == 'f'
|
288
|
+
advance
|
289
|
+
advance
|
267
290
|
return :FALSE, "#f"
|
268
|
-
elsif current_ch ==
|
269
|
-
|
291
|
+
elsif @current_ch == ';'
|
292
|
+
lit = ""
|
270
293
|
while true
|
271
|
-
return :COMMENT,
|
272
|
-
|
273
|
-
|
294
|
+
return :COMMENT, lit if eof? || @current_ch == "\n"
|
295
|
+
lit << @current_ch
|
296
|
+
advance
|
274
297
|
end
|
275
298
|
else
|
276
299
|
return :ILLEGAL, ''
|
@@ -278,12 +301,13 @@ module Lisp
|
|
278
301
|
end
|
279
302
|
|
280
303
|
def consume_token
|
281
|
-
@lookahead_token, @lookahead_literal = read_next_token
|
304
|
+
@lookahead_token, @lookahead_literal = self.read_next_token
|
282
305
|
consume_token if @lookahead_token == :COMMENT
|
283
306
|
end
|
284
307
|
|
285
308
|
def init
|
286
309
|
@line_number = 0
|
310
|
+
advance
|
287
311
|
consume_token
|
288
312
|
end
|
289
313
|
|
data/lib/rubylisp/vector.rb
CHANGED
@@ -2,31 +2,6 @@ module Lisp
|
|
2
2
|
|
3
3
|
class Vector < Atom
|
4
4
|
|
5
|
-
def self.register
|
6
|
-
Primitive.register("make-vector") {|args, env| Lisp::Vector::make_vector_impl(args, env) }
|
7
|
-
Primitive.register("vector") {|args, env| Lisp::Vector::vector_impl(args, env) }
|
8
|
-
end
|
9
|
-
|
10
|
-
def self.make_vector_impl(args, env)
|
11
|
-
c = args
|
12
|
-
a = []
|
13
|
-
while !c.nil?
|
14
|
-
a << c.car.evaluate(env)
|
15
|
-
c = c.cdr
|
16
|
-
end
|
17
|
-
|
18
|
-
Lisp::Vector.new(a)
|
19
|
-
end
|
20
|
-
|
21
|
-
|
22
|
-
def self.vector_impl(args, env)
|
23
|
-
return Lisp::Debug.process_error("vector requires a single list argument.", env) unless args.length == 1
|
24
|
-
|
25
|
-
c = args.car.evaluate(env)
|
26
|
-
Lisp::Vector.new(c.to_a)
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
5
|
def self.with_array(a)
|
31
6
|
self.new(a)
|
32
7
|
end
|
@@ -38,6 +13,10 @@ module Lisp
|
|
38
13
|
end
|
39
14
|
|
40
15
|
|
16
|
+
def update!(a)
|
17
|
+
@value = a
|
18
|
+
end
|
19
|
+
|
41
20
|
def type
|
42
21
|
:vector
|
43
22
|
end
|
@@ -70,24 +49,24 @@ module Lisp
|
|
70
49
|
|
71
50
|
|
72
51
|
def to_s
|
73
|
-
"
|
52
|
+
"#(#{@value.join(' ')})"
|
74
53
|
end
|
75
54
|
|
76
55
|
|
77
56
|
def at(n)
|
78
|
-
@value[n
|
57
|
+
@value[n]
|
79
58
|
end
|
80
59
|
alias_method :nth, :at
|
81
60
|
|
82
61
|
|
83
62
|
def nth_tail(n)
|
84
63
|
return Lisp::Vector.new if n > @value.size
|
85
|
-
Lisp::Vector.new(@value[
|
64
|
+
Lisp::Vector.new(@value[n..-1])
|
86
65
|
end
|
87
66
|
|
88
67
|
|
89
68
|
def at_put(n, d)
|
90
|
-
@value[n
|
69
|
+
@value[n] = d
|
91
70
|
end
|
92
71
|
|
93
72
|
|
@@ -96,11 +75,11 @@ module Lisp
|
|
96
75
|
end
|
97
76
|
|
98
77
|
|
99
|
-
def
|
78
|
+
def equal?(other)
|
100
79
|
return false unless other.vector?
|
101
80
|
return false unless @value.size == other.value.size
|
102
81
|
(0..@value.size).each do |i|
|
103
|
-
return false unless
|
82
|
+
return false unless other.value[i].equal?(value[i])
|
104
83
|
end
|
105
84
|
true
|
106
85
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2014 David R. Astels. All rights reserved.
|
2
|
+
# Use of this source code is governed by a BSD-style
|
3
|
+
# license that can be found in the LICENSE file.
|
4
|
+
|
5
|
+
|
6
|
+
module Lisp
|
7
|
+
|
8
|
+
class Debug
|
9
|
+
|
10
|
+
class <<self
|
11
|
+
attr_accessor :trace, :on_error, :on_entry, :single_step, :interactive, :target_env, :eval_in_debug_repl
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def self.register
|
16
|
+
self.trace = false
|
17
|
+
self.on_error = false
|
18
|
+
self.on_entry = []
|
19
|
+
self.single_step = false
|
20
|
+
self.interactive = false
|
21
|
+
self.target_env = nil
|
22
|
+
self.eval_in_debug_repl = false
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
def self.process_error(error_message, env)
|
27
|
+
raise error_message
|
28
|
+
end
|
29
|
+
|
30
|
+
|
31
|
+
def self.log_eval(sexpr, env)
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
def self.log_result(result, env)
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
def require(*args); end
|
data/lib/rubymotionlisp.rb
CHANGED
@@ -2,11 +2,15 @@ unless defined?(Motion::Project::Config)
|
|
2
2
|
raise "This file must be required within a RubyMotion project Rakefile."
|
3
3
|
end
|
4
4
|
|
5
|
+
lib_dir_path = File.dirname(File.expand_path(__FILE__))
|
5
6
|
Motion::Project::App.setup do |app|
|
6
7
|
insert_point = app.files.find_index { |file| file =~ /^(?:\.\/)?app\// } || 0
|
7
8
|
|
8
9
|
Dir.glob(File.join(File.dirname(__FILE__), 'rubylisp/*.rb')).reverse.each do |file|
|
9
10
|
app.files.insert(insert_point, file)
|
10
11
|
end
|
12
|
+
Dir.glob(File.join(File.dirname(__FILE__), 'rubymotion/*.rb')).reverse.each do |file|
|
13
|
+
app.files.insert(insert_point, file)
|
14
|
+
end
|
11
15
|
|
12
16
|
end
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Astels
|
@@ -17,42 +17,53 @@ extensions: []
|
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
19
|
- README.md
|
20
|
-
- lib/rubylisp/alist.rb
|
21
|
-
- lib/rubylisp/assignment.rb
|
22
20
|
- lib/rubylisp/atom.rb
|
23
21
|
- lib/rubylisp/binding.rb
|
24
22
|
- lib/rubylisp/boolean.rb
|
23
|
+
- lib/rubylisp/builtins.rb
|
25
24
|
- lib/rubylisp/character.rb
|
25
|
+
- lib/rubylisp/class_object.rb
|
26
26
|
- lib/rubylisp/cons_cell.rb
|
27
|
+
- lib/rubylisp/environment.rb
|
27
28
|
- lib/rubylisp/environment_frame.rb
|
28
|
-
- lib/rubylisp/
|
29
|
+
- lib/rubylisp/eof_object.rb
|
29
30
|
- lib/rubylisp/exception.rb
|
30
31
|
- lib/rubylisp/ext.rb
|
31
|
-
- lib/rubylisp/ffi_class.rb
|
32
32
|
- lib/rubylisp/ffi_new.rb
|
33
33
|
- lib/rubylisp/ffi_send.rb
|
34
34
|
- lib/rubylisp/ffi_static.rb
|
35
35
|
- lib/rubylisp/frame.rb
|
36
36
|
- lib/rubylisp/function.rb
|
37
|
-
- lib/rubylisp/io.rb
|
38
|
-
- lib/rubylisp/list_support.rb
|
39
|
-
- lib/rubylisp/logical.rb
|
40
37
|
- lib/rubylisp/macro.rb
|
41
|
-
- lib/rubylisp/
|
42
|
-
- lib/rubylisp/motion_builtins.rb
|
38
|
+
- lib/rubylisp/native_object.rb
|
43
39
|
- lib/rubylisp/number.rb
|
44
|
-
- lib/rubylisp/object.rb
|
45
40
|
- lib/rubylisp/parser.rb
|
41
|
+
- lib/rubylisp/port.rb
|
42
|
+
- lib/rubylisp/prim_alist.rb
|
43
|
+
- lib/rubylisp/prim_assignment.rb
|
44
|
+
- lib/rubylisp/prim_character.rb
|
45
|
+
- lib/rubylisp/prim_class_object.rb
|
46
|
+
- lib/rubylisp/prim_environment.rb
|
47
|
+
- lib/rubylisp/prim_equivalence.rb
|
48
|
+
- lib/rubylisp/prim_frame.rb
|
49
|
+
- lib/rubylisp/prim_io.rb
|
50
|
+
- lib/rubylisp/prim_list_support.rb
|
51
|
+
- lib/rubylisp/prim_logical.rb
|
52
|
+
- lib/rubylisp/prim_math.rb
|
53
|
+
- lib/rubylisp/prim_native_object.rb
|
54
|
+
- lib/rubylisp/prim_relational.rb
|
55
|
+
- lib/rubylisp/prim_special_forms.rb
|
56
|
+
- lib/rubylisp/prim_string.rb
|
57
|
+
- lib/rubylisp/prim_system.rb
|
58
|
+
- lib/rubylisp/prim_type_checks.rb
|
59
|
+
- lib/rubylisp/prim_vector.rb
|
46
60
|
- lib/rubylisp/primitive.rb
|
47
|
-
- lib/rubylisp/relational.rb
|
48
|
-
- lib/rubylisp/special_forms.rb
|
49
61
|
- lib/rubylisp/string.rb
|
50
62
|
- lib/rubylisp/symbol.rb
|
51
|
-
- lib/rubylisp/system.rb
|
52
|
-
- lib/rubylisp/testing.rb
|
53
63
|
- lib/rubylisp/tokenizer.rb
|
54
|
-
- lib/rubylisp/type_checks.rb
|
55
64
|
- lib/rubylisp/vector.rb
|
65
|
+
- lib/rubymotion/debug.rb
|
66
|
+
- lib/rubymotion/require-fix.rb
|
56
67
|
- lib/rubymotionlisp.rb
|
57
68
|
homepage: https://bitbucket.org/dastels/rubylisp
|
58
69
|
licenses:
|
@@ -74,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
85
|
version: '0'
|
75
86
|
requirements: []
|
76
87
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
88
|
+
rubygems_version: 2.5.0
|
78
89
|
signing_key:
|
79
90
|
specification_version: 4
|
80
91
|
summary: Lisp in RubyMotion
|