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 +4 -4
- data/Cargo.lock +4 -4
- data/ext/parsanol_native/Cargo.toml +1 -1
- data/lib/parsanol/native/dynamic.rb +13 -4
- data/lib/parsanol/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5325f925e095453bfd6edaf1db9a8832db4010943b42688c7746cd59a4f4e653
|
|
4
|
+
data.tar.gz: f488cd6bf413889332a8bbee0ad5f07e9dca1f338249fb04d109f85dcf44ba71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
255
|
+
version = "0.8.0"
|
|
256
256
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
257
|
-
checksum = "
|
|
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.
|
|
273
|
+
version = "0.8.0"
|
|
274
274
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
275
|
-
checksum = "
|
|
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.
|
|
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
|
-
#
|
|
158
|
-
|
|
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
|
|
166
|
-
#
|
|
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|
|
data/lib/parsanol/version.rb
CHANGED