expressir 2.4.52-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0eb8725b34a5ea6a5f0024f8c5c6ab607790c7b0c5ae84318fcf17572c084a7d
4
- data.tar.gz: e4ff78b7262bc36677f20e0c8620fab5a71aaa2f71822f175cae6513658a922b
3
+ metadata.gz: f7b903202eee075a584f26d351e6312f9b6d19f912cc965ca98ebadc1f33ab52
4
+ data.tar.gz: 755db167b8eb05ca730a7c0ef01e309e186c5544cd030129c98fbb26a1894f30
5
5
  SHA512:
6
- metadata.gz: 986ae9f02ee1f0e781bf6d45e40411ab48737d6ba2ad1a3968ab3b083057cc47c89b7d8d99a46b9ca4404abf65c0507ccc5dc2d58d5ecf8ac07a896edf7469aa
7
- data.tar.gz: b1ae0a496190f9963326e642f263e284c1cfa00301078d0b21125e8911831fa0d9ec833ae4238c7c7a25841a1124b8a3fe19ae7058255f129a087d7a391f0f15
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.parse_to_model(source, schema_file).tap(&:wire_parents)
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
- Model::ExpFile.from_hash(
217
- Core.parse_to_model_hash(source, schema_file),
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
- RemarkAttacher.new(source).attach(exp_file) if source && include_source != false
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
@@ -3,6 +3,6 @@ module Expressir
3
3
  # autoload it (Ruby autoload only works for module/class constants, not
4
4
  # for string constants like `Expressir::VERSION`).
5
5
  module Version
6
- VERSION = "2.4.52".freeze
6
+ VERSION = "2.4.54".freeze
7
7
  end
8
8
  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.4.52
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-03 00:00:00.000000000 Z
11
+ date: 2026-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64