mulang-ruby 1.1.0 → 1.2.0

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: 7b7e1b03608d32ac99ba99a84ecb6c00a6db128491f7705616a5783cf1bffc22
4
- data.tar.gz: c91a2299b7cdf95dcb2f834041dc5e39a0fcb229cbc044b05eeb5ad758573be0
3
+ metadata.gz: 9ce25f9ddfa919462478020c4996eb79df700ffe92846a351823c330d7e011ed
4
+ data.tar.gz: 13a07d738b7ff03172b3c52cc2d2c5596fd8e14afac84fc920a6185acd9773ec
5
5
  SHA512:
6
- metadata.gz: a00c85cfcdcda31efcc10474c4b5f29e6390131470c7ae2ea7ee841f8cd0ab23b817dc02e40aa26dfc2bc3e821d2395b785db5469e781a2fce0b77f363c13c6e
7
- data.tar.gz: df34437984268e50839c197585716353b7d52cbc9a0577fc433a432e8156f65691a204e96e8b85366f693f82d49d02c95ff3c9fb1b655fd1380fc2675c91655a
6
+ metadata.gz: 93ecfa1b6813275b19b0a598725a14df5269c7f5728ac0e77eb665c4fca702ae148f67311bc8c502648bd2f04d3cfad456f09377d98ff0d1e95d87ca7ffc8aa6
7
+ data.tar.gz: 770b47bd8c440644c8ee7e54b6d8ccaec6dd6ccee562c238cee09e8992061bfb5d6cf99b97e92abb72dc9bd2ba1d5366050487e9c3c10270ef77fe52ce1b2096
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build Status](https://travis-ci.org/mumuki/mulang-ruby.svg)](https://travis-ci.org/mumuki/mulang-ruby)
1
+ [![Build Status](https://travis-ci.org/mumuki/mulang-ruby.svg?branch=master)](https://travis-ci.org/mumuki/mulang-ruby)
2
2
  [![Code Climate](https://codeclimate.com/github/mumuki/mulang-ruby/badges/gpa.svg)](https://codeclimate.com/github/mumuki/mulang-ruby)
3
3
  [![Test Coverage](https://codeclimate.com/github/mumuki/mulang-ruby/badges/coverage.svg)](https://codeclimate.com/github/mumuki/mulang-ruby)
4
4
 
@@ -70,7 +70,14 @@ module Mulang::Ruby
70
70
  id, args, body = *node
71
71
  body ||= s(:nil)
72
72
 
73
- simple_method id, process_all(args), process(body)
73
+ case id
74
+ when :equal?, :eql?, :==
75
+ method :EqualMethod, process_all(args), process(body)
76
+ when :hash
77
+ method :HashMethod, process_all(args), process(body)
78
+ else
79
+ simple_method id, process_all(args), process(body)
80
+ end
74
81
  end
75
82
 
76
83
  def on_block(node)
@@ -174,5 +181,6 @@ module Mulang::Ruby
174
181
 
175
182
  ms :Send, process(receptor), message, (process_all(args) + extra_args)
176
183
  end
184
+
177
185
  end
178
186
  end
@@ -21,11 +21,24 @@ module Mulang::Ruby
21
21
  end
22
22
 
23
23
  def simple_method(name, args, body)
24
- { tag: :Method,
25
- contents: [
26
- name, [
27
- [ args, {tag: :UnguardedBody, contents: body }]]
28
- ]}
24
+ {
25
+ tag: :Method,
26
+ contents: [
27
+ name,
28
+ [
29
+ [ args, {tag: :UnguardedBody, contents: body }]
30
+ ]
31
+ ]
32
+ }
33
+ end
34
+
35
+ def method(tag, args, body)
36
+ {
37
+ tag: tag,
38
+ contents: [
39
+ [ args, {tag: :UnguardedBody, contents: body }]
40
+ ]
41
+ }
29
42
  end
30
43
 
31
44
  def simple_send(sender, message, args)
@@ -1,5 +1,5 @@
1
1
  module Mulang
2
2
  module Ruby
3
- VERSION = "1.1.0"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
data/mulang-ruby.gemspec CHANGED
@@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency "parser"
29
29
  spec.add_dependency "ast"
30
30
  spec.add_dependency "mumukit-core", "~> 1.0"
31
- spec.add_dependency "mulang", "~> 3.3"
31
+ spec.add_dependency "mulang", "~> 3.4"
32
32
  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: 1.1.0
4
+ version: 1.2.0
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: 2017-11-16 00:00:00.000000000 Z
11
+ date: 2017-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '3.3'
103
+ version: '3.4'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '3.3'
110
+ version: '3.4'
111
111
  description: Ruby - Mulang Parser
112
112
  email:
113
113
  - franco@mumuki.org
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  version: '0'
154
154
  requirements: []
155
155
  rubyforge_project:
156
- rubygems_version: 2.7.2
156
+ rubygems_version: 2.7.3
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Ruby integration for the Mulang Language Analyzer