expressir 2.4.59-arm-linux → 2.4.61-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: 88b2c4faa26ba40f3ffabb5bb70ac0a5ecbc2ba72cfc891747d9fbd5ee1cedc3
4
- data.tar.gz: 8b17373bd40394ed1f2e9376206642c0f2ab838460055f2b885c0ecd137d43b7
3
+ metadata.gz: eed4408f7187afa171995f1e6efea55425822a5b3acb33ae7ed7b659532bf5c0
4
+ data.tar.gz: a62e05ed6102e8374d51b1d6c0b387983daefe5f4aa606e0f7f8c853f68caade
5
5
  SHA512:
6
- metadata.gz: 1c7d02e4374a96ea2729e8551563dd9f25f5becbf967dda7945490bf393f8504125d3af5564ad7eb6405d7fc59472f5a8c5c38bea6c076346b21a267e060fd4d
7
- data.tar.gz: c82f9f444d570194ecf30baba70a2458fb2b8c5cbca6aa2dffafb925e9912b35745f4992bce11becb33b49dc3784c902e0ec2f300b16ec7f6718aabfc2c5abc7
6
+ metadata.gz: c9d3045425d53fd50a3388c8832d06b83f6268e96f0ce07bf97a7e04fbcb21f11c1e5a68e13166b69a2a1cfa511db0542f2ca2662e5c58c5357d1337ce99c547
7
+ data.tar.gz: 6aabee62b6b20af41a8a99e5576e0a24f0778f5bcde82b3d3027dc67d7e8a199f57c32d5e89eb060b3c3a844df069b233bbf1162a1aff49531e67a6b1703ba09
Binary file
Binary file
Binary file
Binary file
@@ -619,7 +619,10 @@ module Expressir
619
619
  "",
620
620
  ]
621
621
  end,
622
- *format_remark_items(node),
622
+ # A blank line before each remark-item child, mirroring the
623
+ # core-lane schema emitter — the two lanes must render
624
+ # remark.exp byte-identically for the formatter golden.
625
+ *format_remark_items(node).flat_map { |x| ["", x] },
623
626
  [
624
627
  "END_SCHEMA",
625
628
  ";",
@@ -10,27 +10,43 @@ module Expressir
10
10
  def format_remark_item(node)
11
11
  return "" unless node.remarks&.any?
12
12
 
13
- # Check if any remark contains newlines
14
- has_newlines = node.remarks.any? { |r| r.to_s.include?("\n") }
15
- remarks_text = node.remarks.join("\n")
16
-
17
- # The tag is the schema-relative EXPRESS path: node.path is
18
- # rooted at the ExpFile, whose id is the file path — drop that
19
- # leading segment so the tag reads like the source form
13
+ # The tag form follows the owner: items in rule contexts
14
+ # (WHERE/UNIQUE/IP) historically carry bare tags
15
+ # (`--"unusual_placement" text`), WG12-style items carry the
16
+ # schema-relative path. node.path is rooted at the ExpFile,
17
+ # whose id is the file path — drop that leading segment
20
18
  # (expressir#603).
21
- tag = node.path.to_s
22
- root = node
23
- root = root.parent while root.respond_to?(:parent) && root.parent
24
- prefix = "#{root.id}." if root.respond_to?(:id) && root.id
25
- tag = tag.delete_prefix(prefix) if prefix && tag.start_with?(prefix)
26
-
27
- if has_newlines || node.remarks.length > 1
28
- # Multi-line format: (*"path" remarks *)
29
- "(*\"#{tag}\"\n#{remarks_text}\n*)"
19
+ rule_context = node.parent.is_a?(Model::Declarations::WhereRule) ||
20
+ node.parent.is_a?(Model::Declarations::UniqueRule) ||
21
+ node.parent.is_a?(Model::Declarations::InformalPropositionRule)
22
+ if rule_context
23
+ tag = node.id.to_s
30
24
  else
31
- # Single-line format: --"path" text
32
- "--\"#{tag}\" #{remarks_text}"
25
+ tag = node.path.to_s
26
+ root = node
27
+ root = root.parent while root.respond_to?(:parent) && root.parent
28
+ prefix = "#{root.id}." if root.respond_to?(:id) && root.id
29
+ tag = tag.delete_prefix(prefix) if prefix && tag.start_with?(prefix)
30
+ end
31
+
32
+ # Remark items are WG12 annotation blocks: the embedded form,
33
+ # a block per remark, matching the source convention of the
34
+ # annotated corpora (the conservation pairs are embedded, so
35
+ # tail-form emission reads as phantom gains). Rule-context
36
+ # owners keep the historic bare-tag tail form.
37
+ if rule_context
38
+ return node.remarks
39
+ .map { |remark| "--\"#{tag}\" #{remark}" }
40
+ .join("\n")
33
41
  end
42
+ node.remarks.map do |remark|
43
+ remark = remark.to_s
44
+ if remark.include?("\n")
45
+ "(*\"#{tag}\"\n#{remark}\n*)"
46
+ else
47
+ "(*\"#{tag}\" #{remark} *)"
48
+ end
49
+ end.join("\n")
34
50
  end
35
51
  end
36
52
  end
@@ -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.59".freeze
6
+ VERSION = "2.4.61".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: expressir
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.59
4
+ version: 2.4.61
5
5
  platform: arm-linux
6
6
  authors:
7
7
  - Ribose Inc.