mulang-ruby 4.0.1 → 4.0.2

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
  SHA256:
3
- metadata.gz: d84be5f642367b764ef958bc4a3c511490bc47eb9898a1acc0d78c8cdeb2a151
4
- data.tar.gz: b0c259b85d202208265819dfe756c645e7b1009b4906358ec7c2cfe70c8e05ac
3
+ metadata.gz: 33cc9575fa24b31d336ce8101fc680c7f1f86b2796f80ef769833189b331fa27
4
+ data.tar.gz: ace4b0be67c260bc1205fcf4e95be821eb270ac5f28b4fea6b9dea22bf74e3ad
5
5
  SHA512:
6
- metadata.gz: d8c10787e5920e6fc6b527f5d2d537ba459a94572b57fa33a9eef67609063358ad0b3f46227e3e3dab5192e09c5ae30dd504f51e19d6327d05e7a494d664966b
7
- data.tar.gz: 6ea969e66b862dfd0c0bacc511b1f5c11a546c9e02e43997fb748652006f49080a1a2de02948ddac89e4d2b79bb5f72cbd09b14a0fbbcab5f342fb07897a42ab
6
+ metadata.gz: e5ee8d009b6670930b98e260cb9455e80561483515f06ed9c02f837186ed4a9ae89ff82639e02f187bcbae8e6b17791cb19495565a74b4b2f7432edcdeafcf2b
7
+ data.tar.gz: 5072f9a4f05803bcf5385674859350c133873c6269845e663c75b2db569328fcebe3b85cb581900a72ae2f2a9bf5df4c8c4a2947a11b33ef69f59e4306629f4b
@@ -11,7 +11,7 @@ module Mulang
11
11
  end
12
12
 
13
13
  def self.language
14
- Mumukit::Language::External.new { |it| parse(it) }
14
+ Mulang::Language::External.new { |it| parse(it) }
15
15
  end
16
16
  end
17
17
  end
@@ -130,7 +130,7 @@ module Mulang::Ruby
130
130
 
131
131
  def on_block(node)
132
132
  send, parameters, body = *node
133
- lambda = ms(:Lambda, process_all(parameters), process(body))
133
+ lambda = ms(:Lambda, process_all(parameters), process(body) || ms(:MuNil))
134
134
  handle_send_with_args send, [lambda]
135
135
  end
136
136
 
@@ -151,6 +151,17 @@ module Mulang::Ruby
151
151
  ms :VariablePattern, name
152
152
  end
153
153
 
154
+ def on_for(node)
155
+ variable, list, block = *node
156
+
157
+ pattern = ms(:VariablePattern, variable.children.first)
158
+ ms(:For, [ms(:Generator, pattern, process(list))], process(block) || ms(:MuNil))
159
+ end
160
+
161
+ def on_optarg(node)
162
+ ms :OtherPattern, node.to_s, nil
163
+ end
164
+
154
165
  alias on_restarg on_arg
155
166
  alias on_procarg0 on_arg
156
167
 
@@ -256,7 +267,6 @@ module Mulang::Ruby
256
267
  end
257
268
 
258
269
  def handler_missing(*args)
259
- puts args
260
270
  ms :Other, args.to_s, nil
261
271
  end
262
272
 
@@ -1,5 +1,5 @@
1
1
  module Mulang
2
2
  module Ruby
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mulang-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2019-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler