diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-10-25 09:48:40 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-10-25 09:50:59 +0000 |
| commit | 577abae87d7a73a72d432311a604124bed0a1f4c (patch) | |
| tree | 896dd4fefe9b714714647da8bf1de41e5a9702d1 /hobgoblin/src | |
| parent | 9dfbe7eec5d28f59e32882e6f99c03153fbe2ab8 (diff) | |
Parse query definitions
Diffstat (limited to 'hobgoblin/src')
| -rw-r--r-- | hobgoblin/src/ast/untyped.hob | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/hobgoblin/src/ast/untyped.hob b/hobgoblin/src/ast/untyped.hob index 314eb85..86004f9 100644 --- a/hobgoblin/src/ast/untyped.hob +++ b/hobgoblin/src/ast/untyped.hob @@ -24,6 +24,7 @@ sum UntypedNamespaceStatementNode { variant UntypedDatabaseSchemaDefinitionNode; variant UntypedEnumDefinitionNode; variant UntypedNativeTypeDefinitionNode; + variant UntypedQueryDefinitionNode; variant UntypedStructDefinitionNode; variant UntypedSumDefinitionNode; @@ -57,6 +58,14 @@ struct UntypedNativeTypeDefinitionNode { field source: Source; } +struct UntypedQueryDefinitionNode { + field name: String; + field databaseSchema: UntypedTypeLevelExpressionNode; + field statements: List[UntypedStatementNode]; + field docComment: DocComment; + field source: Source; +} + struct UntypedStructDefinitionNode { field name: String; field typeParams: Option[List[UntypedTypeParamNode]]; @@ -125,6 +134,17 @@ struct UntypedTypeLevelReferenceNode { field source: Source; } +// == Statements == + +sum UntypedStatementNode { + variant UntypedReturnNode; +} + +struct UntypedReturnNode { + field expression: UntypedExpressionNode; + field source: Source; +} + // == Expressions == sum UntypedExpressionNode { |
