parsanol 1.3.73-arm-linux → 1.3.74-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: 265903b9082ad0b5a2391b3511b1f88ef184fa0a6b004b7bacc2d7a75e1866bf
4
- data.tar.gz: e4b2aa82e4f4169a8e695e83dfcb109a1df9e9488d67922146aa809e575a50fd
3
+ metadata.gz: 5f4fd6971980959c2416856fa2afa23b0ba0cb6ed62930a759a52493b2d0e64d
4
+ data.tar.gz: b6d3f736b93a5992acbb8c702a3fd1c5da0a346adc9547f204add487988de24d
5
5
  SHA512:
6
- metadata.gz: 6648b1cc8a2506214a573c9fdead6fad8927be123d5f64bb1e5b7f0d23e563cf4d5804a4252d7d68736245b9e4c65b6900ced5864122ccfcb83186a486792ae9
7
- data.tar.gz: 48eac1a85a67b47f8b56b201c2f710ad043f04510569a14e0db84339259f5a995ef577ad0d5444d4444de7cce4d1620c87af29683915fa50eff47cb8606a6a6a
6
+ metadata.gz: fc2a5ea8e093812e8cf9d705bde54cfed2c8842843bd4b5734f4489912ff366b54e90e502ea9d36fa5e5ade81f56dddeae11bffb9a577b72e9cffdd0227ae727
7
+ data.tar.gz: 3ec2f56416d260345e4ab2a9c9170de1b72f49decd06ec5c2e58cbac747b0f8167bc43b74db35fcc121e3203826d6c00555a32303da50194f3f490144b582e6e
Binary file
Binary file
Binary file
Binary file
@@ -29,6 +29,8 @@ module Parsanol
29
29
  # compiler derives markers from each capturer rule's first Str
30
30
  # atom, e.g. "//" => :line_comment); units not matching any
31
31
  # marker are whitespace-shaped and stay unrecorded.
32
+ attr_reader :capturers
33
+
32
34
  def initialize(atom, capturers)
33
35
  super(atom)
34
36
  @capturers = capturers
Binary file
@@ -78,6 +78,15 @@ module Parsanol
78
78
  serialize_custom_ref(atom)
79
79
  when Parsanol::Atoms::Dynamic
80
80
  serialize_dynamic(atom)
81
+ when Parsanol::Atoms::TriviaCapture
82
+ # parsanol-ruby#152: the capture wrapper carries
83
+ # its marker table so the native engine records
84
+ # comment-shaped units into the pending channel
85
+ # and attaches them to the next Named capture
86
+ # under `comments:`. A distinct variant keeps the
87
+ # declared gate: engines predating it reject
88
+ # capture-carrying artifacts loudly.
89
+ serialize_trivia_capture(atom)
81
90
  when Parsanol::Atoms::Trivia
82
91
  # Wire-distinct from Ignore (rs#172): the Rust
83
92
  # engine suppresses trivia-position diagnostics by
@@ -283,6 +292,16 @@ module Parsanol
283
292
  "parse this grammar with mode: :ruby"
284
293
  end
285
294
 
295
+ def serialize_trivia_capture(atom)
296
+ inner_id = serialize_atom(atom.wrapped_atom)
297
+ {
298
+ "TriviaCapture" => {
299
+ "atom" => inner_id,
300
+ "rules" => atom.capturers.map { |marker, label| [marker, label.to_s] },
301
+ },
302
+ }
303
+ end
304
+
286
305
  def serialize_trivia(atom)
287
306
  inner_id = serialize_atom(atom.wrapped_atom)
288
307
  {
@@ -298,9 +298,17 @@ module Parsanol
298
298
  is_repetition = value.is_a?(Array) && !value.empty? &&
299
299
  value.first.equal?(REPETITION_SYM)
300
300
 
301
+ # parsanol-ruby#152: `comments` lists are host-constructed
302
+ # trivia attachments, not parser repetitions — their unit
303
+ # hashes carry the trivia kind key, never the attachment
304
+ # key, so the re-keying below must not wrap them.
305
+ is_trivia_attachment = is_repetition && sym_key == :comments
306
+
301
307
  transformed = transform(value, named: true)
302
308
 
303
- result[sym_key] = if is_repetition
309
+ result[sym_key] = if is_trivia_attachment
310
+ transformed
311
+ elsif is_repetition
304
312
  if transformed.is_a?(Array)
305
313
  if transformed.all? do |item|
306
314
  item.is_a?(Hash) && item.key?(sym_key)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parsanol
4
- VERSION = "1.3.73"
4
+ VERSION = "1.3.74"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parsanol
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.73
4
+ version: 1.3.74
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-10-06 00:00:00.000000000 Z
11
+ date: 2026-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A small Ruby library for constructing parsers in the PEG (Parsing Expression
14
14
  Grammar) fashion. Parsanol provides Parslet-compatible API with additional features