Generate typed QX bindings and add source editing tools

This commit is contained in:
Timothy J. Aveni
2026-09-08 14:27:24 -07:00
parent ce793cc54f
commit 4e17693d82
30 changed files with 2806 additions and 1939 deletions
+17 -5
View File
@@ -4,6 +4,15 @@ document
: workspaceDecl EOF
| interfaceResourceDecl EOF
| packageResourceDecl EOF
| fragmentDecl EOF
;
fragmentDecl
: FRAGMENT LBRACE workspaceItem* RBRACE
;
sourceImportDecl
: IMPORT stringLiteral SEMI
;
workspaceDecl
@@ -12,7 +21,8 @@ workspaceDecl
;
workspaceItem
: atomDecl
: sourceImportDecl
| atomDecl
| resourceImportDecl
| sharedAttachmentDecl
| conformanceDecl
@@ -142,7 +152,7 @@ dependencyPort
: STATE identifier ID stringLiteral COLON valueType primitiveList SEMI
| EDGE identifier ID stringLiteral COLON cardinality targetConstraint primitiveList SEMI
| INTERFACE identifier ID stringLiteral COLON identifier SEMI
| CONSTRUCTOR identifier ID stringLiteral COLON identifier SEMI
| CONSTRUCTOR identifier ID stringLiteral COLON identifier (INPUT valueType)? SEMI
;
primitiveList
@@ -320,6 +330,7 @@ stringLiteral
;
WORKSPACE: 'workspace';
FRAGMENT: 'fragment';
IMPORT: 'import';
EXTERNAL: 'external';
ATOM: 'atom';
@@ -332,6 +343,7 @@ OPERATION: 'operation';
FUNCTION: 'function';
CONSTRUCTOR: 'constructor';
CONSTRUCTS: 'constructs';
INPUT: 'input';
CONFORM: 'conform';
AS: 'as';
BIND: 'bind';
@@ -423,6 +435,6 @@ STRING_LITERAL: '"' (ESC | ~["\\\r\n])* '"';
fragment ESC: '\\' (["\\/bfnrt] | 'u' HEX HEX HEX HEX);
fragment HEX: [0-9a-fA-F];
LINE_COMMENT: '//' ~[\r\n]* -> skip;
BLOCK_COMMENT: '/*' .*? '*/' -> skip;
WS: [ \t\r\n]+ -> skip;
LINE_COMMENT: '//' ~[\r\n]* -> channel(HIDDEN);
BLOCK_COMMENT: '/*' .*? '*/' -> channel(HIDDEN);
WS: [ \t\r\n]+ -> channel(HIDDEN);