@primmel/primmel 1.8.1 → 1.8.2

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.
@@ -2045,6 +2045,9 @@ function dumpFormField(field, indent) {
2045
2045
  if (field.examples) {
2046
2046
  inner.push('examples "' + escapeString(field.examples) + '"');
2047
2047
  }
2048
+ if (field.bind) {
2049
+ inner.push("bind " + dumpBareSafe(field.bind));
2050
+ }
2048
2051
  if (field.required) {
2049
2052
  inner.push("required true");
2050
2053
  }
@@ -5082,7 +5085,8 @@ var parseSymbol = function(id, data) {
5082
5085
  } else if (command === "latex") {
5083
5086
  result.latex = unwrapped(value);
5084
5087
  } else if (command === "values") {
5085
- result.values = tokenizePackage(value());
5088
+ const v = value();
5089
+ result.values = v.startsWith("{") ? tokenizePackage(v).map(stripWrapping) : [stripWrapping(v)];
5086
5090
  } else if (command === "series") {
5087
5091
  result.series = parseSeriesDecl(unwrapBlock(value()));
5088
5092
  } else if (command === "kind") {
@@ -5161,7 +5165,7 @@ var dumpSymbol = function(s) {
5161
5165
  out += ' latex "' + escapeString(s.latex) + '"\n';
5162
5166
  }
5163
5167
  if (s.values.length > 0) {
5164
- out += " values " + s.values.join(" ") + "\n";
5168
+ out += " values { " + s.values.map(dumpBareSafe).join(" ") + " }\n";
5165
5169
  }
5166
5170
  if (s.series) {
5167
5171
  out += " " + dumpSeriesDecl(s.series) + "\n";
@@ -10598,6 +10602,9 @@ var dumpAttributeDefinition = function(a) {
10598
10602
  for (const s of attrSources) {
10599
10603
  out += dumpSourceRefAsRef(s, " ", escapeString);
10600
10604
  }
10605
+ for (const rid of a.referenceIds) {
10606
+ out += ' ref cites "' + escapeString(rid) + '"\n';
10607
+ }
10601
10608
  out += dumpRefs(a.refs, " ", escapeString);
10602
10609
  out += dumpCorrespondences(
10603
10610
  a.correspondences,
@@ -10629,12 +10636,18 @@ var dumpAttributeDefinition = function(a) {
10629
10636
  if (a.enumRef) {
10630
10637
  out += " enum " + a.enumRef + "\n";
10631
10638
  }
10639
+ if (a.enumValues && a.enumValues.length > 0) {
10640
+ out += " enum_values { " + a.enumValues.map(dumpBareSafe).join(" ") + " }\n";
10641
+ }
10632
10642
  if (a.irdi) {
10633
10643
  out += ' irdi "' + escapeString(a.irdi) + '"\n';
10634
10644
  }
10635
10645
  if (a.derived) {
10636
10646
  out += ' derived "' + escapeString(a.derived) + '"\n';
10637
10647
  }
10648
+ if (a.note) {
10649
+ out += ' note "' + escapeString(a.note) + '"\n';
10650
+ }
10638
10651
  out += "}\n";
10639
10652
  return out;
10640
10653
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primmel/primmel",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
4
  "description": "Primmel — parser, types, and serializer for the Primmel modelling language (successor to MMEL)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",