rubinius-ast 3.7 → 3.8

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: 06e0b46a159bfd5b70e0be0f33d991baac700441
4
- data.tar.gz: e263ff589d929bf5a470c66332a0ae429c08bd40
3
+ metadata.gz: 0fcd85af7bb6b46d7cc98969f55e3d1f7ca2461f
4
+ data.tar.gz: f841f69e37c46dbabdec8cc008b3bf0ef9cfe9a9
5
5
  SHA512:
6
- metadata.gz: ab67238f9e53b7bd5b12e4e4d35a221119b2ae1cbc5a649ced69ea1c6212c133421e3efe34fb316991be446f0cc8b5b3959f2a5e0935f54aa8e42881e745ecdd
7
- data.tar.gz: e828f1158c94f947e665c46553ec251c8321602f94d4de37ee38152ec9eafc49f7215f65eeb3e2b91af3e132dea6efb157afa108198b4128fe4bcbe3335dbf8b
6
+ metadata.gz: 32b46b170eaefa666d06a7dd2489de4e0fc584650eca3f5397a7c4b4607b6d24e458fec4eca3b42fcedb38308bda340a8667097c49c2e6cb5fdcc64dc92d0d76
7
+ data.tar.gz: 6b4818f6358ada39bebbe7e7036c9f213f11aa335146d0bd132a29894886a74961a8ac09828b18485198bd6ec4b950b50575bc34b6263b40b1e015733476fb0f
@@ -185,6 +185,39 @@ module CodeTools
185
185
  end
186
186
  end
187
187
 
188
+ class DefineFunction < Node
189
+ attr_accessor :name, :arguments
190
+
191
+ def initialize(line, name, block)
192
+ @line = line
193
+ @name = name
194
+ @arguments = block.extract_parameters
195
+ block.array << NilLiteral.new(line) if block.array.empty?
196
+ @body = block
197
+ end
198
+
199
+ def bytecode(g)
200
+ pos(g)
201
+
202
+ g.push_const :Kernel
203
+ g.push_literal sexp_name.to_s
204
+ g.push_literal " "
205
+ g.push_literal @name.to_s
206
+ g.string_build 3
207
+ g.send :puts, 1
208
+ end
209
+
210
+ def sexp_name
211
+ :fun
212
+ end
213
+ end
214
+
215
+ class DefineFunctionMulti < DefineFunction
216
+ def sexp_name
217
+ :funm
218
+ end
219
+ end
220
+
188
221
  class Define < ClosedScope
189
222
  attr_accessor :name, :arguments
190
223
 
@@ -238,6 +271,9 @@ module CodeTools
238
271
  end
239
272
  end
240
273
 
274
+ class DefineMulti < Define
275
+ end
276
+
241
277
  class DefineSingleton < Node
242
278
  attr_accessor :receiver, :body
243
279
 
@@ -259,6 +295,9 @@ module CodeTools
259
295
  end
260
296
  end
261
297
 
298
+ class DefineSingletonMulti < DefineSingleton
299
+ end
300
+
262
301
  class DefineSingletonScope < Define
263
302
  def initialize(line, name, block)
264
303
  super line, name, block
@@ -1,5 +1,5 @@
1
1
  module CodeTools
2
2
  module AST
3
- VERSION = "3.7"
3
+ VERSION = "3.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubinius-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: '3.7'
4
+ version: '3.8'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Shirai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-10 00:00:00.000000000 Z
11
+ date: 2016-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler