@shapeshift-labs/frontier-lang-parser 0.3.84 → 0.3.85

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.
@@ -4,7 +4,7 @@ export function parseSemanticOperationsBlock(block) {
4
4
  for (const authoredLine of readAuthoredLines(block)) {
5
5
  const line = authoredLine.text;
6
6
  if (!line || line.startsWith('#')) continue;
7
- const match = /^(operation|op)\s+([A-Za-z_$][\w$-]*)(.*)$/.exec(line);
7
+ const match = /^(operation|op|semanticOperation)\s+([A-Za-z_$][\w$-]*)(.*)$/.exec(line);
8
8
  if (match) operationSet.operations.push(parseSemanticOperationRecord(match[2], match[3], authoredLine));
9
9
  }
10
10
  return operationSet;
@@ -50,10 +50,10 @@ export const ROW_SYNTAX_CONFIG = Object.freeze({
50
50
  gateEvidence: rowConfig('gateAdmissionEvidenceRow', 'gate_admission_evidence_row', gateAdmissionRows, normalizeGateAdmissionRow, coreFailClosed('unsupported-gate-admission-row')),
51
51
  admissionEvidence: rowConfig('gateAdmissionEvidenceRow', 'gate_admission_evidence_row', gateAdmissionRows, normalizeGateAdmissionRow, coreFailClosed('unsupported-gate-admission-row')),
52
52
  routeEvidence: rowConfig('gateAdmissionEvidenceRow', 'gate_admission_evidence_row', gateAdmissionRows, normalizeGateAdmissionRow, coreFailClosed('unsupported-gate-admission-row')),
53
- operations: rowConfig('semanticOperationRow', 'semantic_operation_row', words('operation op'), normalizeOperationRow),
54
- semanticOperations: rowConfig('semanticOperationRow', 'semantic_operation_row', words('operation op'), normalizeOperationRow),
55
- semanticEdits: rowConfig('semanticEditRecordRow', 'semantic_edit_record_row', semanticEditRows, normalizeSemanticEditRow),
56
- semanticEditRecords: rowConfig('semanticEditRecordRow', 'semantic_edit_record_row', semanticEditRows, normalizeSemanticEditRow),
53
+ operations: rowConfig('semanticOperationRow', 'semantic_operation_row', words('operation op semanticOperation'), normalizeOperationRow, coreFailClosed('unsupported-semantic-operation-row')),
54
+ semanticOperations: rowConfig('semanticOperationRow', 'semantic_operation_row', words('operation op semanticOperation'), normalizeOperationRow, coreFailClosed('unsupported-semantic-operation-row')),
55
+ semanticEdits: rowConfig('semanticEditRecordRow', 'semantic_edit_record_row', semanticEditRows, normalizeSemanticEditRow, coreFailClosed('unsupported-semantic-edit-record-row')),
56
+ semanticEditRecords: rowConfig('semanticEditRecordRow', 'semantic_edit_record_row', semanticEditRows, normalizeSemanticEditRow, coreFailClosed('unsupported-semantic-edit-record-row')),
57
57
  paradigm: rowConfig('paradigmRow', 'paradigm_row', words('valueSemantics mutationModel effectModel ownership ownershipModel lifetime lifetimeModel bindingScope binding dispatch typeModel moduleModel concurrency errorModel memoryModel evaluation metaprogramming interop lowering'), normalizeParadigmRow),
58
58
  paradigmSemantics: rowConfig('paradigmRow', 'paradigm_row', words('valueSemantics mutationModel effectModel ownership ownershipModel lifetime lifetimeModel bindingScope binding dispatch typeModel moduleModel concurrency errorModel memoryModel evaluation metaprogramming interop lowering'), normalizeParadigmRow),
59
59
  proof: rowConfig('proofRow', 'proof_row', words('contract refinement invariant termination temporal obligation artifact assumption')),
@@ -208,7 +208,7 @@ function normalizeDecisionGraphRow(rowKind) {
208
208
  }
209
209
 
210
210
  function normalizeOperationRow(rowKind) {
211
- if (rowKind === 'op') return 'operation';
211
+ if (rowKind === 'op' || rowKind === 'semanticOperation') return 'operation';
212
212
  return rowKind;
213
213
  }
214
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshift-labs/frontier-lang-parser",
3
- "version": "0.3.84",
3
+ "version": "0.3.85",
4
4
  "description": "Parser for the first Frontier Lang .frontier syntax slice.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  ],
23
23
  "scripts": {
24
24
  "build": "node scripts/build.mjs",
25
- "test": "npm run build && node test/smoke.mjs && node test/source-syntax-family-summary-smoke.mjs && node test/resource-graph-source-syntax-smoke.mjs && node test/tgt-source-smoke.mjs && node test/native-source-rows-smoke.mjs && node test/member-identity-smoke.mjs && node test/generic-row-parse-identity-smoke.mjs && node test/type-variant-payload-smoke.mjs && node test/type-generic-ref-smoke.mjs && node test/type-parameter-constraints-smoke.mjs && node test/type-structural-expression-smoke.mjs && node test/action-body-smoke.mjs && node test/action-structured-literals-smoke.mjs && node test/action-return-smoke.mjs && node test/action-else-smoke.mjs && node test/action-match-smoke.mjs && node test/action-for-in-smoke.mjs && node test/action-repeat-smoke.mjs && node test/action-call-smoke.mjs && node test/semantic-operation-edit-smoke.mjs && node test/target-projection-aggregate-smoke.mjs && node test/conversion-constraint-fields-smoke.mjs && node test/conversion-evidence-smoke.mjs && node test/gate-admission-evidence-smoke.mjs && node test/package-canvas-surface-smoke.mjs && node test/view-render-graph-smoke.mjs && node test/view-source-syntax-smoke.mjs && node test/resource-graph-smoke.mjs && node test/machine-graph-smoke.mjs && node test/interlingua-smoke.mjs && node test/dialect-registry-smoke.mjs",
25
+ "test": "npm run build && node test/smoke.mjs && node test/source-syntax-family-summary-smoke.mjs && node test/resource-graph-source-syntax-smoke.mjs && node test/tgt-source-smoke.mjs && node test/native-source-rows-smoke.mjs && node test/semantic-edit-source-syntax-smoke.mjs && node test/member-identity-smoke.mjs && node test/generic-row-parse-identity-smoke.mjs && node test/type-variant-payload-smoke.mjs && node test/type-generic-ref-smoke.mjs && node test/type-parameter-constraints-smoke.mjs && node test/type-structural-expression-smoke.mjs && node test/action-body-smoke.mjs && node test/action-structured-literals-smoke.mjs && node test/action-return-smoke.mjs && node test/action-else-smoke.mjs && node test/action-match-smoke.mjs && node test/action-for-in-smoke.mjs && node test/action-repeat-smoke.mjs && node test/action-call-smoke.mjs && node test/semantic-operation-edit-smoke.mjs && node test/target-projection-aggregate-smoke.mjs && node test/conversion-constraint-fields-smoke.mjs && node test/conversion-evidence-smoke.mjs && node test/gate-admission-evidence-smoke.mjs && node test/package-canvas-surface-smoke.mjs && node test/view-render-graph-smoke.mjs && node test/view-source-syntax-smoke.mjs && node test/resource-graph-smoke.mjs && node test/machine-graph-smoke.mjs && node test/interlingua-smoke.mjs && node test/dialect-registry-smoke.mjs",
26
26
  "typecheck": "node ./node_modules/typescript/bin/tsc --noEmit -p test/tsconfig.json",
27
27
  "fuzz": "npm run build && node fuzz/smoke.mjs",
28
28
  "bench": "npm run build && node bench/smoke.mjs",