expressir 2.4.53-arm-linux → 2.4.54-arm-linux
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/lib/expressir/3.2/expressir_core.so +0 -0
- data/lib/expressir/3.3/expressir_core.so +0 -0
- data/lib/expressir/3.4/expressir_core.so +0 -0
- data/lib/expressir/4.0/expressir_core.so +0 -0
- data/lib/expressir/express/core.rb +8 -0
- data/lib/expressir/express/parser.rb +32 -7
- 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: f7b903202eee075a584f26d351e6312f9b6d19f912cc965ca98ebadc1f33ab52
|
|
4
|
+
data.tar.gz: 755db167b8eb05ca730a7c0ef01e309e186c5544cd030129c98fbb26a1894f30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ff1b6efd397cb8b1e2e7ff14980051c94c5975b8daede7805e297ac7ce906027067eaad5aee32c9e3f6c444c88868fe271a6147558c5c83c464edf84ddd143ac
|
|
7
|
+
data.tar.gz: 61be9bb6a60e121b6eb3d41ad0279c35d843e03c6391b6a5996453ac90b87829790cb1d3296d3d5fadada6161bdb2ac0e33d92a468314bab085296c6d2810cad
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -40,6 +40,14 @@ module Expressir
|
|
|
40
40
|
JSON.parse(::Expressir::Core.parse_to_model_hash(source, path))
|
|
41
41
|
end
|
|
42
42
|
|
|
43
|
+
# Parse EXPRESS source into the hydrated model with the remark
|
|
44
|
+
# attachment run in the core (issue #20): the wire carries the
|
|
45
|
+
# attached remarks before hydration, so the Ruby RemarkAttacher
|
|
46
|
+
# never runs on this lane.
|
|
47
|
+
def self.parse_to_model_attached(source, path)
|
|
48
|
+
::Expressir::Core.parse_to_model_attached(source, path)
|
|
49
|
+
end
|
|
50
|
+
|
|
43
51
|
# Scan remarks (issue #20): an Array of Hashes mirroring
|
|
44
52
|
# RemarkScanner::Remark's fields (position, end_position, line,
|
|
45
53
|
# text, tag, format), straight from the Rust scanner.
|
|
@@ -208,14 +208,21 @@ module Expressir
|
|
|
208
208
|
source = strip_bom(File.read(file))
|
|
209
209
|
schema_file = root_path ? Pathname.new(file.to_s).relative_path_from(root_path).to_s : file.to_s
|
|
210
210
|
|
|
211
|
+
remarks_attached = false
|
|
211
212
|
exp_file =
|
|
212
213
|
begin
|
|
213
|
-
Core.
|
|
214
|
+
if Core.respond_to?(:parse_to_model_attached)
|
|
215
|
+
remarks_attached = true
|
|
216
|
+
Core.parse_to_model_attached(source, schema_file)
|
|
217
|
+
.tap(&:wire_parents)
|
|
218
|
+
else
|
|
219
|
+
Core.parse_to_model(source, schema_file).tap(&:wire_parents)
|
|
220
|
+
end
|
|
214
221
|
rescue NotImplementedError
|
|
215
222
|
begin
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
)&.tap(&:wire_parents)
|
|
223
|
+
wire = JSON.parse(Core.parse_to_model_hash(source, schema_file))
|
|
224
|
+
strip_end_offsets!(wire)
|
|
225
|
+
Model::ExpFile.from_hash(wire)&.tap(&:wire_parents)
|
|
219
226
|
rescue StandardError => e
|
|
220
227
|
raise Error::SchemaParseFailure.new(schema_file, e)
|
|
221
228
|
end
|
|
@@ -224,7 +231,8 @@ module Expressir
|
|
|
224
231
|
end
|
|
225
232
|
|
|
226
233
|
finalize_loaded_file(exp_file, source, schema_file,
|
|
227
|
-
include_source: include_source
|
|
234
|
+
include_source: include_source,
|
|
235
|
+
remarks_attached: remarks_attached)
|
|
228
236
|
|
|
229
237
|
unless skip_references
|
|
230
238
|
Expressir::Benchmark.measure_references do
|
|
@@ -240,8 +248,10 @@ module Expressir
|
|
|
240
248
|
# Shared post-parse steps for every core-path file: remark
|
|
241
249
|
# attachment, header-remark transfer, and path wiring.
|
|
242
250
|
def self.finalize_loaded_file(exp_file, source, schema_file,
|
|
243
|
-
include_source: nil)
|
|
244
|
-
|
|
251
|
+
include_source: nil, remarks_attached: false)
|
|
252
|
+
if source && include_source != false && !remarks_attached
|
|
253
|
+
RemarkAttacher.new(source).attach(exp_file)
|
|
254
|
+
end
|
|
245
255
|
|
|
246
256
|
transfer_header_to_schema(exp_file, source)
|
|
247
257
|
|
|
@@ -251,6 +261,21 @@ module Expressir
|
|
|
251
261
|
schema.file_basename = File.basename(schema_file, ".exp")
|
|
252
262
|
end
|
|
253
263
|
end
|
|
264
|
+
|
|
265
|
+
# The model layer declares no source_end_offset; the wire carries
|
|
266
|
+
# it for the attacher, and the from_hash fallback must not see it.
|
|
267
|
+
def self.strip_end_offsets!(obj)
|
|
268
|
+
case obj
|
|
269
|
+
when Hash
|
|
270
|
+
obj.delete("source_end_offset")
|
|
271
|
+
obj.each_value { |value| strip_end_offsets!(value) }
|
|
272
|
+
when Array
|
|
273
|
+
obj.each { |value| strip_end_offsets!(value) }
|
|
274
|
+
end
|
|
275
|
+
obj
|
|
276
|
+
end
|
|
277
|
+
private_class_method :strip_end_offsets!
|
|
278
|
+
|
|
254
279
|
private_class_method :finalize_loaded_file
|
|
255
280
|
|
|
256
281
|
# Whether the native batch compiler is usable: the extension is
|
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.4.
|
|
4
|
+
version: 2.4.54
|
|
5
5
|
platform: arm-linux
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|