mulang 6.10.0 → 6.11.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: 7de4072f7ca40dab23b727e1050c90014807bde737f8757089cc816ae2767a78
4
- data.tar.gz: 734117a52f4a327a1f4ec7bb2d117437230a8015449a65455147042c26e40168
3
+ metadata.gz: 2f1a4740bbee58f1217a84e9f02ccb44bc8dec065f6cf21d914cc633390871bc
4
+ data.tar.gz: f7ab7634aa8e62c8ebd5d219a424151ebed59f7f36923fd65a3235a97d357bad
5
5
  SHA512:
6
- metadata.gz: 0be8b19d3d973c5ad65d09e51932c22130609e6d67bed901f4871a4e510e6b5f1b5c5b6d7c73f467c2e0f2adaaf67db57fa49b3f1463dfc6d7f37f70a15b9536
7
- data.tar.gz: 255d9c0cc9cb01ec7a3aaef3906ecf0ae700b1d4c2d2fbfffe27f90e50903d4398378aeccc747777b40bcfa488b8a3de7e00a9b131ee402da61eb2dbde12ba35
6
+ metadata.gz: a67f196be9b0e7992b591057aee87a2142284a1510629283c8925b7bb847d60898ae757f146a1d61c840340aa6e6bebe0aef380d426f98ef763cf18ffd35ab3f
7
+ data.tar.gz: ff34f0acea211d70eb106d339095709b5088deebcb38b3f703c7bea8dae741b82a7299a3baa0d1f2233f5c4e63a428aa15530fa8e5951c490afb82ef5d763f1e
data/bin/mulang CHANGED
Binary file
data/lib/locales/en.yml CHANGED
@@ -9,6 +9,8 @@ en:
9
9
  with_char: ' with character <code>%{value}</code>'
10
10
  with_false: ' with value <code>%{keyword_False}</code>'
11
11
  with_literal: ' with a literal value'
12
+ with_any_string: ' with a string literal'
13
+ with_any_number: ' with a number literal'
12
14
  with_logic: ' with a boolean expression'
13
15
  with_math: ' with a math expression'
14
16
  with_nil: ' with <code>%{keyword_Nil}</code>'
@@ -39,10 +41,10 @@ en:
39
41
  DeclaresClass_like: '%{binding} %{must} declare a class similar to %{target}'
40
42
  DeclaresClass_named: '%{binding} %{must} declare a class %{target}'
41
43
  DeclaresClass: '%{binding} %{must} declare classes'
42
- DeclaresComputation_except: '%{binding} %{must} declare computations distinct from %{target}'
43
- DeclaresComputation_like: '%{binding} %{must} declare a computation similar to %{target}'
44
- DeclaresComputation_named: '%{binding} %{must} declare a computation %{target}'
45
- DeclaresComputation: '%{binding} %{must} declare computations'
44
+ DeclaresComputation_except: '%{binding} %{must} declare computations distinct from %{target}%{matching}'
45
+ DeclaresComputation_like: '%{binding} %{must} declare a computation similar to %{target}%{matching}'
46
+ DeclaresComputation_named: '%{binding} %{must} declare a computation %{target}%{matching}'
47
+ DeclaresComputation: '%{binding} %{must} declare computations%{matching}'
46
48
  DeclaresComputationWithArity0_named: '%{target} %{must} have zero parameters'
47
49
  DeclaresComputationWithArity1_named: '%{target} %{must} have one parameter'
48
50
  DeclaresComputationWithArity2_named: '%{target} %{must} have 2 parameters'
@@ -183,9 +185,9 @@ en:
183
185
  UsesGuards: '%{binding} %{must} use guards%{matching}'
184
186
  UsesIf: '%{binding} %{must} use <code>%{keyword_If}</code>%{matching}'
185
187
  UsesLambda: '%{binding} %{must} use lambda expressions%{matching}'
186
- UsesLogic: '%{binding} %{must} usar boolean operators'
188
+ UsesLogic: '%{binding} %{must} use boolean operators'
187
189
  UsesLoop: '%{binding} %{must} use a loop%{matching}'
188
- UsesMath: '%{binding} %{must} usar math expressions'
190
+ UsesMath: '%{binding} %{must} use math expressions'
189
191
  UsesMixin: '%{binding} %{must} use mixins'
190
192
  UsesNamedSelfReference: '%{binding} should use <code>%{keyword_Self}</code> instead of a global reference'
191
193
  UsesNot: '%{binding} %{must} use not'
data/lib/locales/es.yml CHANGED
@@ -9,6 +9,8 @@ es:
9
9
  with_char: ' con el carácter <code>%{value}</code>'
10
10
  with_false: ' con el valor <code>%{keyword_False}</code>'
11
11
  with_literal: ' con un valor literal'
12
+ with_any_string: ' con un string literal'
13
+ with_any_number: ' con un número literal'
12
14
  with_logic: ' con una expresión booleana'
13
15
  with_math: 'con una expresión matemática'
14
16
  with_nil: ' con <code>%{keyword_Nil}</code>'
@@ -39,10 +41,10 @@ es:
39
41
  DeclaresClass_like: '%{binding} %{must} declarar una clase parecida a %{target}'
40
42
  DeclaresClass_named: '%{binding} %{must} declarar una clase %{target}'
41
43
  DeclaresClass: '%{binding} %{must} declarar clases'
42
- DeclaresComputation_except: '%{binding} %{must} declarar computaciones diferentes a %{target}'
43
- DeclaresComputation_like: '%{binding} %{must} declarar una computación parecida a %{target}'
44
- DeclaresComputation_named: '%{binding} %{must} declarar una computación %{target}'
45
- DeclaresComputation: '%{binding} %{must} declarar computaciones'
44
+ DeclaresComputation_except: '%{binding} %{must} declarar computaciones diferentes a %{target}%{matching}'
45
+ DeclaresComputation_like: '%{binding} %{must} declarar una computación parecida a %{target}%{matching}'
46
+ DeclaresComputation_named: '%{binding} %{must} declarar una computación %{target}%{matching}'
47
+ DeclaresComputation: '%{binding} %{must} declarar computaciones%{matching}'
46
48
  DeclaresComputationWithArity0_named: '%{target} %{must} declarar cero parametros'
47
49
  DeclaresComputationWithArity1_named: '%{target} %{must} tener un parámetro'
48
50
  DeclaresComputationWithArity2_named: '%{target} %{must} tener dos parámetros'
data/lib/locales/pt.yml CHANGED
@@ -9,6 +9,8 @@ pt:
9
9
  with_char: ' com o caractere <code>%{value}</code>'
10
10
  with_false: ' com o valor <code>%{keyword_False}</code>'
11
11
  with_literal: ' com um valor literal'
12
+ with_any_string: ' com uma string literal'
13
+ with_any_number: ' com um número literal'
12
14
  with_logic: ' com uma expressão booleana'
13
15
  with_math: ' com uma expressão matemática'
14
16
  with_nil: ' com <code>%{keyword_Nil}</code>'
@@ -39,10 +41,10 @@ pt:
39
41
  DeclaresClass_like: '%{binding} %{must} declarar uma classe semelhante a %{target}'
40
42
  DeclaresClass_named: '%{binding} %{must} declarar uma classe %{target}'
41
43
  DeclaresClass: '%{binding} %{must} declarar classes'
42
- DeclaresComputation_except: '%{binding} %{must} declarar cálculos diferentes de %{target}'
43
- DeclaresComputation_like: '%{binding} %{must} declarar uma computação semelhante a %{target}'
44
- DeclaresComputation_named: '%{binding} %{must} declarar uma computação %{target}'
45
- DeclaresComputation: '%{binding} %{must} declarar cálculos'
44
+ DeclaresComputation_except: '%{binding} %{must} declarar cálculos diferentes de %{target}%{matching}'
45
+ DeclaresComputation_like: '%{binding} %{must} declarar uma computação semelhante a %{target}%{matching}'
46
+ DeclaresComputation_named: '%{binding} %{must} declarar uma computação %{target}%{matching}'
47
+ DeclaresComputation: '%{binding} %{must} declarar cálculos%{matching}'
46
48
  DeclaresComputationWithArity0_named: '%{target} %{must} declarar parâmetros zero'
47
49
  DeclaresComputationWithArity1_named: '%{target} %{must} ter um parâmetro'
48
50
  DeclaresComputationWithArity2_named: '%{target} %{must} ter dois parâmetros'
data/lib/mulang/code.rb CHANGED
@@ -40,11 +40,11 @@ module Mulang
40
40
 
41
41
  def expect(binding='*', inspection)
42
42
  expectation = Mulang::Expectation.parse(binding: binding, inspection: inspection).as_v2.to_h
43
- expectation_results_for(analyse(expectations: [expectation])).first['result']
43
+ expectation_results_for(analyse({expectations: [expectation]})).first['result']
44
44
  end
45
45
 
46
46
  def custom_expect(edl)
47
- expectation_results_for(analyse(customExpectations: edl))
47
+ expectation_results_for(analyse({customExpectations: edl}))
48
48
  .map { |e| [e['expectation']['inspection'], e['result']] }
49
49
  .to_h
50
50
  end
@@ -5,7 +5,8 @@ class Mulang::Inspection::Matcher
5
5
  WithAnything WithChar WithFalse WithLiteral
6
6
  WithLogic WithMath WithNil WithNonliteral
7
7
  WithNumber WithReference WithString
8
- WithSymbol WithTrue)
8
+ WithSymbol WithTrue
9
+ WithAnyString WithAnyNumber)
9
10
 
10
11
  attr_accessor :type, :value
11
12
 
@@ -12,7 +12,7 @@ module Mulang
12
12
  ^(?<negation>Not:)?
13
13
  (?<type>[^:]+)
14
14
  (
15
- :(?<matcher>WithAnything|WithLiteral|WithNonliteral|WithLogic|WithMath|WithFalse|WithNil|WithTrue) |
15
+ :(?<matcher>WithAnything|WithLiteral|WithNonliteral|WithAnyString|WithAnyNumber|WithLogic|WithMath|WithFalse|WithNil|WithTrue) |
16
16
  :(?<matcher>WithReference|WithChar|WithNumber|WithString|WithSymbol):(?<value>[^:]+) |
17
17
  :(?<target>[^:]+)(:(?<matcher>[^:]+)(:(?<value>[^:]+))?)?
18
18
  )?$}.gsub(/\s/, '')
@@ -49,7 +49,7 @@ module Mulang::Language
49
49
  expectations: [],
50
50
  smellsSet: { tag: 'NoSmells' },
51
51
  includeOutputAst: false,
52
- normalizationOptions: normalization_options(options)
52
+ normalizationOptions: normalization_options(**options)
53
53
  }.merge(spec).compact
54
54
  }
55
55
  end
@@ -98,7 +98,7 @@ module Mulang::Language
98
98
  }
99
99
  end
100
100
 
101
- def build_analysis(*)
101
+ def build_analysis(*, **)
102
102
  super.deep_merge(spec: {originalLanguage: core_name}.compact)
103
103
  end
104
104
 
data/lib/mulang/tokens.rb CHANGED
@@ -131,6 +131,7 @@ module Mulang
131
131
  keyword_Return: 'return',
132
132
  keyword_While: 'while',
133
133
  keyword_Self: 'this',
134
+ keyword_ForEach: 'for..of',
134
135
  operator_And: '&amp;&amp;',
135
136
  operator_Divide: '/',
136
137
  operator_Equal: '===',
@@ -167,6 +168,7 @@ module Mulang
167
168
  keyword_Return: 'return',
168
169
  keyword_While: 'while',
169
170
  keyword_Self: 'self',
171
+ keyword_ForEach: 'for..in',
170
172
  operator_And: 'and',
171
173
  operator_Divide: '/',
172
174
  operator_Equal: '==',
@@ -1,4 +1,4 @@
1
1
  module Mulang
2
- VERSION = "6.10.0"
3
- MULANG_VERSION = "6.10.0"
2
+ VERSION = "6.11.0"
3
+ MULANG_VERSION = "6.11.0"
4
4
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mulang
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.10.0
4
+ version: 6.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-04 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">"
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '1.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">"
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.0'
26
+ version: '1.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: codeclimate-test-reporter
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '6.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: '6.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '12.3'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '12.3'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -134,14 +134,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: '0'
137
+ version: '3.0'
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
- rubygems_version: 3.0.3
144
+ rubygems_version: 3.3.26
145
145
  signing_key:
146
146
  specification_version: 4
147
147
  summary: Gem wrapper for mulang tool