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 +4 -4
- data/lib/mulang/ruby.rb +1 -1
- data/lib/mulang/ruby/ast_processor.rb +12 -2
- data/lib/mulang/ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33cc9575fa24b31d336ce8101fc680c7f1f86b2796f80ef769833189b331fa27
|
4
|
+
data.tar.gz: ace4b0be67c260bc1205fcf4e95be821eb270ac5f28b4fea6b9dea22bf74e3ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5ee8d009b6670930b98e260cb9455e80561483515f06ed9c02f837186ed4a9ae89ff82639e02f187bcbae8e6b17791cb19495565a74b4b2f7432edcdeafcf2b
|
7
|
+
data.tar.gz: 5072f9a4f05803bcf5385674859350c133873c6269845e663c75b2db569328fcebe3b85cb581900a72ae2f2a9bf5df4c8c4a2947a11b33ef69f59e4306629f4b
|
data/lib/mulang/ruby.rb
CHANGED
@@ -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
|
|
data/lib/mulang/ruby/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|