parsanol 1.3.43 → 1.3.44

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: 814afb04f4b2103e9ae8576c3fdf4a26bcea60188fc5b532e4cb2026fad6b4fa
4
- data.tar.gz: 9887324f65bde0871d0846436e9ba17b4e0a5552f64a0a5423dbe573a0e56637
3
+ metadata.gz: 5325f925e095453bfd6edaf1db9a8832db4010943b42688c7746cd59a4f4e653
4
+ data.tar.gz: f488cd6bf413889332a8bbee0ad5f07e9dca1f338249fb04d109f85dcf44ba71
5
5
  SHA512:
6
- metadata.gz: '00359eb91d71fc4828af6cf828a1e0b0bf601d7b57bcee9512c75b556191013c3e51dbb8b802db49679225373fa7e12416397dab23012651e11fef0418c0fb83'
7
- data.tar.gz: a5b5a81d07aca624dec8533d616c881bf3e80f409dc5eaa1b2e1b97f8352847f653f0e6a0c55aaef8bc8066041bce074c359b3134133aa02cf0e047a89665b28
6
+ metadata.gz: 17001681c2d197b20f43554f06001eaba5e1609fd643c36e211d765c9621146fa194ec08b92aadb4b6e1db3031c96542b79ec6fd5af528afe2963888d7583a6e
7
+ data.tar.gz: 8a92e009273c51c25e6fcd82555fcab7ea4c434acdc3b9fe1a00bee224aac7a3a5b61928c2eb54b8e6c628af5f868834a3661c42e2a8469c03ab11c19e87ecef
data/Cargo.lock CHANGED
@@ -252,9 +252,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
252
252
 
253
253
  [[package]]
254
254
  name = "parsanol"
255
- version = "0.7.8"
255
+ version = "0.8.0"
256
256
  source = "registry+https://github.com/rust-lang/crates.io-index"
257
- checksum = "bfbd4090b5ce4561173add70ff457538bb68126e5b35fc324d2c1b894a7c106d"
257
+ checksum = "1ecc42a41158e995721abd67597b8269202ce97a96d0916237de1a6766a09666"
258
258
  dependencies = [
259
259
  "ahash",
260
260
  "getrandom 0.3.4",
@@ -270,9 +270,9 @@ dependencies = [
270
270
 
271
271
  [[package]]
272
272
  name = "parsanol-derive"
273
- version = "0.7.8"
273
+ version = "0.8.0"
274
274
  source = "registry+https://github.com/rust-lang/crates.io-index"
275
- checksum = "ee1284783ebfc5a0ad9fbef9b69755c1565aa8c183466874e4bd2edfc26c4f85"
275
+ checksum = "ca98743f47e44a3d9fcc2bf0deb23c82a6aa6fca3d50ec227099c90a2fc8b23a"
276
276
  dependencies = [
277
277
  "proc-macro2",
278
278
  "quote",
@@ -28,7 +28,7 @@ rb-sys = { version = "0.9.124", features = ["global-allocator"] }
28
28
  magnus = { version = "0.9" }
29
29
 
30
30
  # parsanol parser library (from git for latest features)
31
- parsanol = { version = "0.7.8", features = ["ruby"] }
31
+ parsanol = { version = "0.8.0", features = ["ruby"] }
32
32
 
33
33
  # Logging
34
34
  log = "0.4"
@@ -154,16 +154,25 @@ module Parsanol
154
154
 
155
155
  return nil unless result
156
156
 
157
- # Return the result (should be a parslet/atom)
158
- result
157
+ # Capture-write contract (GH-80): return the atom and the
158
+ # post-call captures hash; the Rust bridge diffs it against
159
+ # the seeded values and propagates the block's writes
160
+ # (ctx.captures[:k] = v) into the parse's capture state,
161
+ # where backtracking scopes discard them on branch failure.
162
+ [result, ctx.captures]
159
163
  end
160
164
  end
161
165
  end
162
166
 
163
167
  # Context object passed to dynamic callbacks
164
168
  #
165
- # Provides read-only access to the parsing context including
166
- # input string, current position, and captured values.
169
+ # Provides access to the parsing context including input string,
170
+ # current position, and captured values. Capture READS see state
171
+ # set before the dynamic atom (capture atoms and earlier blocks'
172
+ # writes). Capture WRITES (ctx.captures[:k] = v) propagate into
173
+ # the parse's capture state and are visible to later blocks —
174
+ # and are discarded with the enclosing branch when backtracking
175
+ # fails it (parsanol-ruby#80).
167
176
  #
168
177
  # @example
169
178
  # dynamic { |ctx|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.43"
4
+ VERSION = "1.3.44"
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.43
4
+ version: 1.3.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.