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 +4 -4
- data/.gitignore +16 -0
- data/.rubocop_todo.yml +3 -11
- data/lib/expressir/express/builders/constant_builder.rb +3 -1
- data/lib/expressir/express/builders/derived_attr_builder.rb +3 -1
- data/lib/expressir/express/builders/domain_rule_builder.rb +3 -1
- data/lib/expressir/express/builders/expression_builder.rb +13 -8
- data/lib/expressir/express/builders/helpers.rb +6 -0
- data/lib/expressir/express/builders/statement_builder.rb +12 -4
- data/lib/expressir/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: 055f0b5a07f8fdbd0f078d9010e4dc4d119058a0301016bf93254d86e96c38af
|
|
4
|
+
data.tar.gz: 5f340ae55403cb3115536299cacce02fb102661035b875e251975eb8334e06a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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-
|
|
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:
|
|
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:
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
226
|
+
data = ast_data[:qualifier] || ast_data
|
|
227
|
+
if data[:attribute_qualifier]
|
|
227
228
|
Builder.build_node(:attribute_qualifier,
|
|
228
|
-
|
|
229
|
-
elsif
|
|
230
|
-
Builder.build_node(:group_qualifier,
|
|
231
|
-
elsif
|
|
232
|
-
Builder.build_node(: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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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
|
|
data/lib/expressir/version.rb
CHANGED
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
|
+
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
|
+
date: 2026-05-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|