Implement typed module contracts and conformance bindings

This commit is contained in:
Timothy J. Aveni
2026-09-22 13:51:32 -07:00
parent 60b44a6637
commit 7173751f37
33 changed files with 2963 additions and 2261 deletions
+15 -7
View File
@@ -93,6 +93,11 @@ interfaceMember
: valueMember
| relationshipMember
| operationMember
| moduleMember
;
moduleMember
: MODULE identifier ID stringLiteral CONTRACT stringLiteral (SUBJECT targetConstraint)? SEMI
;
operationMember
@@ -146,11 +151,11 @@ packageExport
| packageConstructorExport
| packageQuery
| packageQuerySpecialization
| componentDecl
| moduleExport
;
componentDecl
: COMPONENT identifier ID stringLiteral SUBJECT interfaceType RUNTIME identifier SEMI
moduleExport
: MODULE identifier ID stringLiteral IMPLEMENTS interfaceType DOT identifier SEMI
;
presentationDecl
@@ -296,6 +301,11 @@ conformanceItem
| stateFieldBindingDecl
| initializationDecl
| relationshipMaterializationDecl
| moduleBindingDecl
;
moduleBindingDecl
: BIND identifier TO identifier DOT identifier SEMI
;
initializationDecl
@@ -481,10 +491,8 @@ identifier
| RESULT_BYTES
| RPC_CALLS
| DEADLINE_MS
| COMPONENT
| PRESENTATION
| SUBJECT
| RUNTIME
| FOR
;
@@ -493,10 +501,10 @@ stringLiteral
;
EDIT: 'edit';
COMPONENT: 'component';
MODULE: 'module';
CONTRACT: 'contract';
PRESENTATION: 'presentation';
SUBJECT: 'subject';
RUNTIME: 'runtime';
FOR: 'for';
CREATION: 'creation';
INITIALIZE: 'initialize';