File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type {
66 Enum ,
77 Expression ,
88 FunctionDecl ,
9+ GeneratorDecl ,
910 InvocationExpr ,
1011 Model ,
1112 TypeDef ,
@@ -31,6 +32,7 @@ export function registerValidationChecks(services: ZModelServices) {
3132 const checks : ValidationChecks < ZModelAstType > = {
3233 Model : validator . checkModel ,
3334 DataSource : validator . checkDataSource ,
35+ GeneratorDecl : validator . checkGenerator ,
3436 DataModel : validator . checkDataModel ,
3537 TypeDef : validator . checkTypeDef ,
3638 Enum : validator . checkEnum ,
@@ -56,6 +58,10 @@ export class ZModelValidator {
5658 new DataSourceValidator ( ) . validate ( node , accept ) ;
5759 }
5860
61+ checkGenerator ( node : GeneratorDecl , accept : ValidationAcceptor ) : void {
62+ accept ( 'warning' , '"generator" is not used by ZenStack and should be removed.' , { node } ) ;
63+ }
64+
5965 checkDataModel ( node : DataModel , accept : ValidationAcceptor ) : void {
6066 new DataModelValidator ( ) . validate ( node , accept ) ;
6167 }
You can’t perform that action at this time.
0 commit comments