parsanol 1.3.117 → 1.3.119

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: '069ffc4a0b824942b8c6e21cbab7a9b0e450636049338c4f38fce28d3109e2d7'
4
- data.tar.gz: 3b1341f63b428c23cfe66169eb0c9c5cf52b98c7af09ee785954f3256fa0db1f
3
+ metadata.gz: 67aae8e5d3989aea79f8b7934427aa3bc48f5538e376b064b41139f2cf2a7ee5
4
+ data.tar.gz: 20e5ad4cf20805a5f5f3416bd3b9e01c6f641dae2445d426e3d18940f675084d
5
5
  SHA512:
6
- metadata.gz: 7c1d2039bab57923c91d24bf6a791ea86b23d71d576e51e51140f4bcd5044b962fb6fd333ba1c0df4ecdcd8828d0547f380c2d5c54520e3bb7a588c62b427ddb
7
- data.tar.gz: 7d321301a11d0a437a964930c77d84a80bdd112be959476f8be087b585649efd36fd197f0b915bb51e5b865953ef3670ddbe77e66b910f450c7bb3976958d68d
6
+ metadata.gz: 1c841924f938fb86048edc8aef0f3634e9f0a9a25285bf654867896ece9c5158d9e21f680a5f8d89d01dd0bf383777e6b646a40dcbc94a65b40e3f75543dbf3b
7
+ data.tar.gz: 99f3cfd84878458d5657f3a3626c17f74af3e7faf7bd63af4977ca6d133cdb7d9adcbb130087a783d452e4155443b51ffdfe14b77cc04019fe87c3a4ce76c44a
data/Cargo.lock CHANGED
@@ -307,9 +307,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
307
307
 
308
308
  [[package]]
309
309
  name = "parsanol"
310
- version = "0.19.14"
310
+ version = "0.19.16"
311
311
  source = "registry+https://github.com/rust-lang/crates.io-index"
312
- checksum = "27faaa398cc92b331b0e1d08abfa475e697e8d23b0ea90e211a3dc8590e42bbd"
312
+ checksum = "f596e68877779b96fc95f22596888ae5aa225808d3036b07bbe4bdea64dc1ce7"
313
313
  dependencies = [
314
314
  "ahash",
315
315
  "getrandom 0.3.4",
@@ -326,9 +326,9 @@ dependencies = [
326
326
 
327
327
  [[package]]
328
328
  name = "parsanol-derive"
329
- version = "0.19.14"
329
+ version = "0.19.16"
330
330
  source = "registry+https://github.com/rust-lang/crates.io-index"
331
- checksum = "b6a65826a4a1f7ec796e29916963803a3deff86f9f9de9e8180f49f6173292a4"
331
+ checksum = "6c143eb5133735869adbf4740919948c5f6a2cf234beb16e0b57bcfd5fdbd1a6"
332
332
  dependencies = [
333
333
  "proc-macro2",
334
334
  "quote",
@@ -74,6 +74,14 @@ module Parsanol
74
74
  # any instance keep the legacy occurrence pairing.
75
75
  instances = shape && group_instances(shape, prefix)
76
76
  if instances
77
+ # The occurrence path's `return if count.zero?`: a repetition
78
+ # that fired zero iterations (the tree carries `parts: []`)
79
+ # binds no key — the recorded native expectations and the
80
+ # pubid builders rely on the absent reading (the empty-array
81
+ # binding regression, caught by the pubid corpus gate; see
82
+ # parsanol-rs#370).
83
+ return if instances.empty?
84
+
77
85
  list = (out[prefix.to_sym] ||= [])
78
86
  instances.each do |instance|
79
87
  found = collect_captures(instance)
@@ -185,9 +193,31 @@ module Parsanol
185
193
 
186
194
  value.to_s
187
195
  when "boolean" then value == true || value.to_s.casecmp("true").zero?
196
+ when "any"
197
+ # The ONE plain shape on every engine (ruby#383): scalars and
198
+ # capture leaves render as their text, named groups as plain
199
+ # string-keyed hashes, repeats as arrays — so (any)-bound keys
200
+ # survive a cross-engine gate without consumer shims.
201
+ plain(value)
188
202
  else value
189
203
  end
190
204
  end
205
+
206
+ # The engine-neutral reduction behind (any): capture leaves
207
+ # (Parsanol::Slice, native wire objects) and scalars render as
208
+ # their text, hashes as string-keyed plain hashes, arrays
209
+ # recurse. Nil passes through (absent captures stay absent —
210
+ # assign_scalar/assign_array skip them upstream).
211
+ def plain(value)
212
+ case value
213
+ when nil then nil
214
+ when String then value
215
+ when Hash
216
+ value.to_h { |key, item| [key.to_s, plain(item)] }
217
+ when Array then value.map { |item| plain(item) }
218
+ else value.to_s
219
+ end
220
+ end
191
221
  end
192
222
  end
193
223
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.117"
4
+ VERSION = "1.3.119"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.117
4
+ version: 1.3.119
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.