@shapeshift-labs/frontier-lang-parser 0.3.80 → 0.3.82
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.
- package/dist/source-syntax-row-config.js +25 -14
- package/package.json +2 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
const appRows = words('role sourcePath path sourceHash host hostId mount provide provides required requires require route event asset gate gap proofGap evidence proofEvidence');
|
|
2
|
-
const canvasRows = words('element command state stateWrite trace gap proofGap evidence proofEvidence');
|
|
2
|
+
const canvasRows = words('sourcePath path sourceHash element command state stateWrite trace gap proofGap evidence proofEvidence');
|
|
3
3
|
const constraintRows = words('variable var constraint hard soft preference prefer collapse admission');
|
|
4
4
|
const dialectRows = words('dialect record extern');
|
|
5
5
|
const interlinguaRows = words('layer constraint edge obligation proofObligation proof lowering lower source sourceLift lift evidence');
|
|
6
6
|
const machineRows = words('label directive register reg flag conditionFlag basicBlock block instruction inst instr op opcode operand arg memoryEffect memoryAccess load store atomic fence memory mem effect controlEdge edge branch call return ret interrupt irq exception proof proofObligation obligation gap proofGap evidence proofEvidence');
|
|
7
7
|
const migrationRows = words('from fromVersion to toVersion change invariant invariants');
|
|
8
|
-
const packageRows = words('metadata dependency script export gap proofGap evidence proofEvidence');
|
|
8
|
+
const packageRows = words('sourcePath path sourceHash packageManager metadata dependency script export gap proofGap evidence proofEvidence');
|
|
9
9
|
const runtimeRows = words('host runtimeHost hostProfile sourceHost targetHost capability hostCapability hostBinding binding requirement runtimeRequirement requiredRuntime evidence proofEvidence gap proofGap');
|
|
10
10
|
const semanticEditRows = words('script semanticEditScript projection semanticEditProjection replay semanticEditReplay');
|
|
11
11
|
const gateAdmissionRows = words('gate evidence proofEvidence admission admissionDecision proofObligation obligation gap proofGap');
|
|
12
|
+
const resourceRows = words('sourceLanguage language sourcePath path sourceHash status evidence evidenceIds resource owner loan alias move drop escape lifetime lifetimeRegion life outlives lifetimeRelation lifeRelation borrow borrowScope borrowRegion unsafe unsafeBoundary memory memoryRegion region layout dataLayout pointer ptr address access memoryAccess atomic volatile abi abiBoundary callBoundary sync synchronization synchronisation synchronizationEdge synchronisationEdge happensBefore happens-before hb fence fenceEdge barrier barrierEdge trap traps undefined undefinedBehavior undefinedBehaviour ub conflict proof proofObligation obligation proofEvidence sourceMap sourcemap mapping sourceMapMapping missingEvidence');
|
|
12
13
|
const coreFailClosed = (reason) => ({ failClosedUnknownRows: true, unknownRowReason: reason });
|
|
13
14
|
|
|
14
15
|
export const ROW_SYNTAX_CONFIG = Object.freeze({
|
|
@@ -19,8 +20,8 @@ export const ROW_SYNTAX_CONFIG = Object.freeze({
|
|
|
19
20
|
runtimeCapabilities: rowConfig('runtimeCapabilityRow', 'runtime_capability_row', runtimeRows, normalizeRuntimeCapabilityRow),
|
|
20
21
|
runtimeCapabilityMatrix: rowConfig('runtimeCapabilityRow', 'runtime_capability_row', runtimeRows, normalizeRuntimeCapabilityRow),
|
|
21
22
|
runtimeHosts: rowConfig('runtimeCapabilityRow', 'runtime_capability_row', runtimeRows, normalizeRuntimeCapabilityRow),
|
|
22
|
-
resourceGraph: rowConfig('resourceGraphRow', 'resource_graph_row',
|
|
23
|
-
semanticResourceGraph: rowConfig('resourceGraphRow', 'resource_graph_row',
|
|
23
|
+
resourceGraph: rowConfig('resourceGraphRow', 'resource_graph_row', resourceRows, normalizeResourceGraphRow, coreFailClosed('unsupported-resource-graph-row')),
|
|
24
|
+
semanticResourceGraph: rowConfig('resourceGraphRow', 'resource_graph_row', resourceRows, normalizeResourceGraphRow, coreFailClosed('unsupported-resource-graph-row')),
|
|
24
25
|
machineGraph: rowConfig('machineGraphRow', 'machine_graph_row', machineRows, normalizeMachineGraphRow, coreFailClosed('unsupported-machine-graph-row')),
|
|
25
26
|
executionGraph: rowConfig('machineGraphRow', 'machine_graph_row', machineRows, normalizeMachineGraphRow, coreFailClosed('unsupported-machine-graph-row')),
|
|
26
27
|
lowLevelGraph: rowConfig('machineGraphRow', 'machine_graph_row', machineRows, normalizeMachineGraphRow, coreFailClosed('unsupported-machine-graph-row')),
|
|
@@ -35,11 +36,11 @@ export const ROW_SYNTAX_CONFIG = Object.freeze({
|
|
|
35
36
|
pluginSurface: rowConfig('applicationSurfaceRow', 'application_surface_row', appRows, normalizeApplicationSurfaceRow, coreFailClosed('unsupported-application-surface-row')),
|
|
36
37
|
pluginContract: rowConfig('applicationSurfaceRow', 'application_surface_row', appRows, normalizeApplicationSurfaceRow, coreFailClosed('unsupported-application-surface-row')),
|
|
37
38
|
target: rowConfig('targetProjectionRow', 'target_projection_row', words('projection lowering layer')),
|
|
38
|
-
packageManifest: rowConfig('packageManifestRow', 'package_manifest_row', packageRows,
|
|
39
|
-
packageGraph: rowConfig('packageManifestRow', 'package_manifest_row', packageRows,
|
|
40
|
-
packageSurface: rowConfig('packageManifestRow', 'package_manifest_row', packageRows,
|
|
41
|
-
canvasSurface: rowConfig('canvasSurfaceRow', 'canvas_surface_row', canvasRows, normalizeCanvasSurfaceRow),
|
|
42
|
-
canvasGraph: rowConfig('canvasSurfaceRow', 'canvas_surface_row', canvasRows, normalizeCanvasSurfaceRow),
|
|
39
|
+
packageManifest: rowConfig('packageManifestRow', 'package_manifest_row', packageRows, normalizePackageManifestRow, coreFailClosed('unsupported-package-manifest-row')),
|
|
40
|
+
packageGraph: rowConfig('packageManifestRow', 'package_manifest_row', packageRows, normalizePackageManifestRow, coreFailClosed('unsupported-package-manifest-row')),
|
|
41
|
+
packageSurface: rowConfig('packageManifestRow', 'package_manifest_row', packageRows, normalizePackageManifestRow, coreFailClosed('unsupported-package-manifest-row')),
|
|
42
|
+
canvasSurface: rowConfig('canvasSurfaceRow', 'canvas_surface_row', canvasRows, normalizeCanvasSurfaceRow, coreFailClosed('unsupported-canvas-surface-row')),
|
|
43
|
+
canvasGraph: rowConfig('canvasSurfaceRow', 'canvas_surface_row', canvasRows, normalizeCanvasSurfaceRow, coreFailClosed('unsupported-canvas-surface-row')),
|
|
43
44
|
constraintSpace: rowConfig('constraintSpaceRow', 'constraint_space_row', constraintRows, normalizeConstraintSpaceRow),
|
|
44
45
|
possibilitySpace: rowConfig('constraintSpaceRow', 'constraint_space_row', constraintRows, normalizeConstraintSpaceRow),
|
|
45
46
|
decisionGraph: rowConfig('decisionGraphRow', 'decision_graph_row', words('node edge chunk gate evidence semanticChange change patchEvent patch admissionDecision admission candidateDecision candidate mergeDecision merge replay tournament tournamentCandidate panelProjection panel rsiLoop improvementFeedback feedback'), normalizeDecisionGraphRow),
|
|
@@ -86,19 +87,23 @@ function normalizeRuntimeCapabilityRow(rowKind) {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
function normalizeResourceGraphRow(rowKind) {
|
|
89
|
-
if (rowKind === '
|
|
90
|
-
if (rowKind === '
|
|
91
|
-
if (rowKind === '
|
|
90
|
+
if (rowKind === 'language') return 'sourceLanguage';
|
|
91
|
+
if (rowKind === 'path') return 'sourcePath';
|
|
92
|
+
if (rowKind === 'lifetime' || rowKind === 'life') return 'lifetimeRegion';
|
|
93
|
+
if (rowKind === 'outlives' || rowKind === 'lifeRelation') return 'lifetimeRelation';
|
|
94
|
+
if (rowKind === 'borrow' || rowKind === 'borrowRegion') return 'borrowScope';
|
|
92
95
|
if (rowKind === 'unsafe') return 'unsafeBoundary';
|
|
93
96
|
if (rowKind === 'memory' || rowKind === 'region') return 'memoryRegion';
|
|
94
97
|
if (rowKind === 'layout') return 'dataLayout';
|
|
95
98
|
if (rowKind === 'pointer' || rowKind === 'ptr' || rowKind === 'address') return 'pointerEdge';
|
|
96
99
|
if (rowKind === 'access' || rowKind === 'atomic' || rowKind === 'volatile') return 'memoryAccess';
|
|
97
100
|
if (rowKind === 'abi' || rowKind === 'callBoundary') return 'abiBoundary';
|
|
98
|
-
if (rowKind === 'sync' || rowKind === 'synchronization' || rowKind === 'synchronisation' || rowKind === 'synchronisationEdge' || rowKind === 'happensBefore' || rowKind === 'hb' || rowKind === 'fence' || rowKind === 'fenceEdge' || rowKind === 'barrier' || rowKind === 'barrierEdge') return 'synchronizationEdge';
|
|
101
|
+
if (rowKind === 'sync' || rowKind === 'synchronization' || rowKind === 'synchronisation' || rowKind === 'synchronisationEdge' || rowKind === 'happensBefore' || rowKind === 'happens-before' || rowKind === 'hb' || rowKind === 'fence' || rowKind === 'fenceEdge' || rowKind === 'barrier' || rowKind === 'barrierEdge') return 'synchronizationEdge';
|
|
99
102
|
if (rowKind === 'traps') return 'trap';
|
|
100
103
|
if (rowKind === 'undefined' || rowKind === 'undefinedBehaviour' || rowKind === 'ub') return 'undefinedBehavior';
|
|
101
|
-
if (rowKind === 'proof' || rowKind === '
|
|
104
|
+
if (rowKind === 'proof' || rowKind === 'obligation') return 'proofObligation';
|
|
105
|
+
if (rowKind === 'evidenceIds' || rowKind === 'proofEvidence') return 'evidence';
|
|
106
|
+
if (rowKind === 'sourcemap' || rowKind === 'mapping' || rowKind === 'sourceMapMapping') return 'sourceMap';
|
|
102
107
|
return rowKind;
|
|
103
108
|
}
|
|
104
109
|
|
|
@@ -158,7 +163,13 @@ function normalizeProofEvidenceRows(rowKind) {
|
|
|
158
163
|
return rowKind;
|
|
159
164
|
}
|
|
160
165
|
|
|
166
|
+
function normalizePackageManifestRow(rowKind) {
|
|
167
|
+
if (rowKind === 'path') return 'sourcePath';
|
|
168
|
+
return normalizeProofEvidenceRows(rowKind);
|
|
169
|
+
}
|
|
170
|
+
|
|
161
171
|
function normalizeCanvasSurfaceRow(rowKind) {
|
|
172
|
+
if (rowKind === 'path') return 'sourcePath';
|
|
162
173
|
if (rowKind === 'stateWrite') return 'state-write';
|
|
163
174
|
return normalizeProofEvidenceRows(rowKind);
|
|
164
175
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshift-labs/frontier-lang-parser",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.82",
|
|
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/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/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",
|