expressir 2.3.4 → 2.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e990830fa008a30ebb6b937e503030069e175b329ff44f3eebe212adaa5066b
4
- data.tar.gz: 6f84bc382c6e49c6402298a5e1f6557343ad6864e7dfa5364bc52e4467fc6cf3
3
+ metadata.gz: 055f0b5a07f8fdbd0f078d9010e4dc4d119058a0301016bf93254d86e96c38af
4
+ data.tar.gz: 5f340ae55403cb3115536299cacce02fb102661035b875e251975eb8334e06a8
5
5
  SHA512:
6
- metadata.gz: ae27b6f9b65e7622db436d3658867ce76587884b215b0a6f74954740c0110ae957b8ed35c887a7ebeda0c91ea7db4b30bb23836da21730e5cba296a7b2bfc9dd
7
- data.tar.gz: 362a01b5e21d36d050ec1049f626a44bb0e62cd2ced0cd74c5581faee4f9903313fe5aaefff20df5c2c814979df4bc806ef621b23cbdb9af71831128485cbc33
6
+ metadata.gz: 0e6f194e91f9db5c9fdf5d1f25777a054e040dd015e66a7ba253503d80bdd73f04f872041cb3f7e6b415c0e9ff80660619c7ea7f1751de6ed0469bd73e7b2310
7
+ data.tar.gz: b49300bb99f04eea589b524affa6a96f4ba2dc37773c583042e047b2682b1e9eab64dbe2e9ce0dfbc37f47ddffb3d83c0240a03b72090654e8ed56d88db8c024
data/.gitignore CHANGED
@@ -24,3 +24,19 @@
24
24
  _site/
25
25
 
26
26
  Gemfile.lock
27
+
28
+ # Claude Code
29
+ .claude/
30
+
31
+ # Development / transient files
32
+ *.ler
33
+ *.pax
34
+ TODO.*.md
35
+ debug_*.rb
36
+ measure_mem.rb
37
+ tmp_*.rb
38
+ mise.toml
39
+ Gemfile.local
40
+ Gemfile.local.lock
41
+ Gemfile.original
42
+ benchmark/
data/.rubocop_todo.yml CHANGED
@@ -1,20 +1,12 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-05-11 08:18:39 UTC using RuboCop version 1.86.0.
3
+ # on 2026-05-12 14:41:49 UTC using RuboCop version 1.86.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 4
10
- # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: EnforcedStyle, IndentationWidth.
12
- # SupportedStyles: with_first_argument, with_fixed_indentation
13
- Layout/ArgumentAlignment:
14
- Exclude:
15
- - 'lib/expressir/express/remark_attacher.rb'
16
-
17
- # Offense count: 1082
9
+ # Offense count: 1084
18
10
  # This cop supports safe autocorrection (--autocorrect).
19
11
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
20
12
  # URISchemes: http, https
@@ -80,7 +72,7 @@ Metrics/BlockNesting:
80
72
  Metrics/CyclomaticComplexity:
81
73
  Enabled: false
82
74
 
83
- # Offense count: 287
75
+ # Offense count: 289
84
76
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
85
77
  Metrics/MethodLength:
86
78
  Max: 167
@@ -12,7 +12,9 @@ module Expressir
12
12
  def build_constant_body(ast_data)
13
13
  id = Builder.build_optional(ast_data[:constant_id])
14
14
  type = Builder.build_optional(ast_data[:instantiable_type])
15
- expression = Builder.build_optional(ast_data[:expression])
15
+ expression = if ast_data[:expression]
16
+ Builder.build({ expression: ast_data[:expression] })
17
+ end
16
18
 
17
19
  Expressir::Model::Declarations::Constant.new(id: id, type: type,
18
20
  expression: expression)
@@ -11,7 +11,9 @@ module Expressir
11
11
  Builder.build({ attribute_decl: attr_decl_data })
12
12
  end
13
13
  type = Builder.build_optional(ast_data[:parameter_type])
14
- expression = Builder.build_optional(ast_data[:expression])
14
+ expression = if ast_data[:expression]
15
+ Builder.build({ expression: ast_data[:expression] })
16
+ end
15
17
 
16
18
  Expressir::Model::Declarations::DerivedAttribute.new(
17
19
  id: attr&.id,
@@ -9,7 +9,9 @@ module Expressir
9
9
  inner_data = ast_data[:domain_rule] || ast_data
10
10
 
11
11
  id = Builder.build_optional(inner_data[:rule_label_id])
12
- expression = Builder.build_optional(inner_data[:expression])
12
+ expression = if inner_data[:expression]
13
+ Builder.build({ expression: inner_data[:expression] })
14
+ end
13
15
  Expressir::Model::Declarations::WhereRule.new(id: id,
14
16
  expression: expression)
15
17
  end
@@ -223,13 +223,14 @@ module Expressir
223
223
  end
224
224
 
225
225
  def build_qualifier(ast_data)
226
- if ast_data[:attribute_qualifier]
226
+ data = ast_data[:qualifier] || ast_data
227
+ if data[:attribute_qualifier]
227
228
  Builder.build_node(:attribute_qualifier,
228
- ast_data[:attribute_qualifier])
229
- elsif ast_data[:group_qualifier]
230
- Builder.build_node(:group_qualifier, ast_data[:group_qualifier])
231
- elsif ast_data[:index_qualifier]
232
- Builder.build_node(:index_qualifier, ast_data[:index_qualifier])
229
+ data[:attribute_qualifier])
230
+ elsif data[:group_qualifier]
231
+ Builder.build_node(:group_qualifier, data[:group_qualifier])
232
+ elsif data[:index_qualifier]
233
+ Builder.build_node(:index_qualifier, data[:index_qualifier])
233
234
  end
234
235
  end
235
236
 
@@ -304,7 +305,9 @@ module Expressir
304
305
  end
305
306
 
306
307
  def build_parameter(ast_data)
307
- Builder.build_optional(ast_data[:expression])
308
+ if ast_data[:expression]
309
+ Builder.build({ expression: ast_data[:expression] })
310
+ end
308
311
  end
309
312
 
310
313
  # Entity constructor
@@ -354,7 +357,9 @@ module Expressir
354
357
  end
355
358
 
356
359
  def build_element(ast_data)
357
- expression = Builder.build_optional(ast_data[:expression])
360
+ expression = if ast_data[:expression]
361
+ Builder.build({ expression: ast_data[:expression] })
362
+ end
358
363
  repetition = Builder.build_optional(ast_data[:repetition])
359
364
 
360
365
  if repetition
@@ -138,6 +138,12 @@ module Expressir
138
138
  when Expressir::Model::References::IndexReference
139
139
  Expressir::Model::References::IndexReference.new(ref: ref,
140
140
  index1: qualifier.index1, index2: qualifier.index2)
141
+ when Expressir::Model::References::SimpleReference
142
+ Expressir::Model::References::AttributeReference.new(ref: ref,
143
+ attribute: qualifier)
144
+ when Hash
145
+ Expressir::Model::References::IndexReference.new(ref: ref,
146
+ index1: qualifier[:index1], index2: qualifier[:index2])
141
147
  else
142
148
  ref
143
149
  end
@@ -36,7 +36,9 @@ module Expressir
36
36
 
37
37
  def build_assignment_stmt(ast_data)
38
38
  ref = Builder.build_optional(ast_data[:general_ref])
39
- expression = Builder.build_optional(ast_data[:expression])
39
+ expression = if ast_data[:expression]
40
+ Builder.build({ expression: ast_data[:expression] })
41
+ end
40
42
 
41
43
  if ast_data[:qualifier]
42
44
  Builder.ensure_array(ast_data[:qualifier]).each do |qual|
@@ -93,7 +95,9 @@ module Expressir
93
95
  end
94
96
 
95
97
  def build_selector(ast_data)
96
- Builder.build_optional(ast_data[:expression])
98
+ if ast_data[:expression]
99
+ Builder.build({ expression: ast_data[:expression] })
100
+ end
97
101
  end
98
102
 
99
103
  def build_case_action(ast_data)
@@ -107,7 +111,9 @@ module Expressir
107
111
  end
108
112
 
109
113
  def build_case_label(ast_data)
110
- Builder.build_optional(ast_data[:expression])
114
+ if ast_data[:expression]
115
+ Builder.build({ expression: ast_data[:expression] })
116
+ end
111
117
  end
112
118
 
113
119
  def build_compound_stmt(ast_data)
@@ -170,7 +176,9 @@ module Expressir
170
176
  end
171
177
 
172
178
  def build_return_stmt(ast_data)
173
- expression = Builder.build_optional(ast_data[:expression])
179
+ expression = if ast_data[:expression]
180
+ Builder.build({ expression: ast_data[:expression] })
181
+ end
174
182
  Expressir::Model::Statements::Return.new(expression: expression)
175
183
  end
176
184
 
@@ -1,3 +1,3 @@
1
1
  module Expressir
2
- VERSION = "2.3.4".freeze
2
+ VERSION = "2.3.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-11 00:00:00.000000000 Z
11
+ date: 2026-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64