agentlang 0.0.2
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/LICENSE +83 -0
- package/README.md +120 -0
- package/bin/cli.js +4 -0
- package/out/api/http.d.ts +3 -0
- package/out/api/http.d.ts.map +1 -0
- package/out/api/http.js +290 -0
- package/out/api/http.js.map +1 -0
- package/out/cli/cli-util.d.ts +7 -0
- package/out/cli/cli-util.d.ts.map +1 -0
- package/out/cli/cli-util.js +9 -0
- package/out/cli/cli-util.js.map +1 -0
- package/out/cli/docs.d.ts +2 -0
- package/out/cli/docs.d.ts.map +1 -0
- package/out/cli/docs.js +236 -0
- package/out/cli/docs.js.map +1 -0
- package/out/cli/main.d.ts +288 -0
- package/out/cli/main.d.ts.map +1 -0
- package/out/cli/main.js +119 -0
- package/out/cli/main.js.map +1 -0
- package/out/cli/openapi-docs.yml +695 -0
- package/out/extension/main.cjs +18093 -0
- package/out/extension/main.cjs.map +7 -0
- package/out/extension/main.d.ts +4 -0
- package/out/extension/main.d.ts.map +1 -0
- package/out/extension/main.js +42 -0
- package/out/extension/main.js.map +1 -0
- package/out/language/agentlang-module.d.ts +42 -0
- package/out/language/agentlang-module.d.ts.map +1 -0
- package/out/language/agentlang-module.js +42 -0
- package/out/language/agentlang-module.js.map +1 -0
- package/out/language/agentlang-validator.d.ts +15 -0
- package/out/language/agentlang-validator.d.ts.map +1 -0
- package/out/language/agentlang-validator.js +50 -0
- package/out/language/agentlang-validator.js.map +1 -0
- package/out/language/generated/ast.d.ts +491 -0
- package/out/language/generated/ast.d.ts.map +1 -0
- package/out/language/generated/ast.js +934 -0
- package/out/language/generated/ast.js.map +1 -0
- package/out/language/generated/grammar.d.ts +7 -0
- package/out/language/generated/grammar.d.ts.map +1 -0
- package/out/language/generated/grammar.js +4475 -0
- package/out/language/generated/grammar.js.map +1 -0
- package/out/language/generated/module.d.ts +14 -0
- package/out/language/generated/module.d.ts.map +1 -0
- package/out/language/generated/module.js +21 -0
- package/out/language/generated/module.js.map +1 -0
- package/out/language/main-browser.d.ts +2 -0
- package/out/language/main-browser.d.ts.map +1 -0
- package/out/language/main-browser.js +10 -0
- package/out/language/main-browser.js.map +1 -0
- package/out/language/main.cjs +36229 -0
- package/out/language/main.cjs.map +7 -0
- package/out/language/main.d.ts +2 -0
- package/out/language/main.d.ts.map +1 -0
- package/out/language/main.js +11 -0
- package/out/language/main.js.map +1 -0
- package/out/language/parser.d.ts +9 -0
- package/out/language/parser.d.ts.map +1 -0
- package/out/language/parser.js +273 -0
- package/out/language/parser.js.map +1 -0
- package/out/language/syntax.d.ts +155 -0
- package/out/language/syntax.d.ts.map +1 -0
- package/out/language/syntax.js +527 -0
- package/out/language/syntax.js.map +1 -0
- package/out/runtime/agents/common.d.ts +2 -0
- package/out/runtime/agents/common.d.ts.map +1 -0
- package/out/runtime/agents/common.js +178 -0
- package/out/runtime/agents/common.js.map +1 -0
- package/out/runtime/agents/impl/openai.d.ts +8 -0
- package/out/runtime/agents/impl/openai.d.ts.map +1 -0
- package/out/runtime/agents/impl/openai.js +15 -0
- package/out/runtime/agents/impl/openai.js.map +1 -0
- package/out/runtime/agents/provider.d.ts +21 -0
- package/out/runtime/agents/provider.d.ts.map +1 -0
- package/out/runtime/agents/provider.js +32 -0
- package/out/runtime/agents/provider.js.map +1 -0
- package/out/runtime/agents/registry.d.ts +2 -0
- package/out/runtime/agents/registry.d.ts.map +1 -0
- package/out/runtime/agents/registry.js +10 -0
- package/out/runtime/agents/registry.js.map +1 -0
- package/out/runtime/auth/cognito.d.ts +16 -0
- package/out/runtime/auth/cognito.d.ts.map +1 -0
- package/out/runtime/auth/cognito.js +186 -0
- package/out/runtime/auth/cognito.js.map +1 -0
- package/out/runtime/auth/defs.d.ts +11 -0
- package/out/runtime/auth/defs.d.ts.map +1 -0
- package/out/runtime/auth/defs.js +24 -0
- package/out/runtime/auth/defs.js.map +1 -0
- package/out/runtime/auth/interface.d.ts +22 -0
- package/out/runtime/auth/interface.d.ts.map +1 -0
- package/out/runtime/auth/interface.js +2 -0
- package/out/runtime/auth/interface.js.map +1 -0
- package/out/runtime/defs.js +24 -0
- package/out/runtime/defs.js.map +1 -0
- package/out/runtime/interpreter.d.ts +69 -0
- package/out/runtime/interpreter.d.ts.map +1 -0
- package/out/runtime/interpreter.js +1163 -0
- package/out/runtime/interpreter.js.map +1 -0
- package/out/runtime/loader.d.ts +25 -0
- package/out/runtime/loader.d.ts.map +1 -0
- package/out/runtime/loader.js +346 -0
- package/out/runtime/loader.js.map +1 -0
- package/out/runtime/logger.d.ts +2 -0
- package/out/runtime/logger.d.ts.map +1 -0
- package/out/runtime/logger.js +44 -0
- package/out/runtime/logger.js.map +1 -0
- package/out/runtime/module.d.ts +273 -0
- package/out/runtime/module.d.ts.map +1 -0
- package/out/runtime/module.js +1786 -0
- package/out/runtime/module.js.map +1 -0
- package/out/runtime/modules/ai.d.ts +26 -0
- package/out/runtime/modules/ai.d.ts.map +1 -0
- package/out/runtime/modules/ai.js +211 -0
- package/out/runtime/modules/ai.js.map +1 -0
- package/out/runtime/modules/auth.d.ts +39 -0
- package/out/runtime/modules/auth.d.ts.map +1 -0
- package/out/runtime/modules/auth.js +359 -0
- package/out/runtime/modules/auth.js.map +1 -0
- package/out/runtime/modules/core.d.ts +2 -0
- package/out/runtime/modules/core.d.ts.map +1 -0
- package/out/runtime/modules/core.js +67 -0
- package/out/runtime/modules/core.js.map +1 -0
- package/out/runtime/relgraph.d.ts +21 -0
- package/out/runtime/relgraph.d.ts.map +1 -0
- package/out/runtime/relgraph.js +156 -0
- package/out/runtime/relgraph.js.map +1 -0
- package/out/runtime/resolvers/interface.d.ts +59 -0
- package/out/runtime/resolvers/interface.d.ts.map +1 -0
- package/out/runtime/resolvers/interface.js +111 -0
- package/out/runtime/resolvers/interface.js.map +1 -0
- package/out/runtime/resolvers/registry.d.ts +8 -0
- package/out/runtime/resolvers/registry.d.ts.map +1 -0
- package/out/runtime/resolvers/registry.js +26 -0
- package/out/runtime/resolvers/registry.js.map +1 -0
- package/out/runtime/resolvers/sqldb/database.d.ts +50 -0
- package/out/runtime/resolvers/sqldb/database.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/database.js +618 -0
- package/out/runtime/resolvers/sqldb/database.js.map +1 -0
- package/out/runtime/resolvers/sqldb/dbutil.d.ts +18 -0
- package/out/runtime/resolvers/sqldb/dbutil.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/dbutil.js +221 -0
- package/out/runtime/resolvers/sqldb/dbutil.js.map +1 -0
- package/out/runtime/resolvers/sqldb/impl.d.ts +26 -0
- package/out/runtime/resolvers/sqldb/impl.d.ts.map +1 -0
- package/out/runtime/resolvers/sqldb/impl.js +300 -0
- package/out/runtime/resolvers/sqldb/impl.js.map +1 -0
- package/out/runtime/state.js +83 -0
- package/out/runtime/state.js.map +1 -0
- package/out/runtime/util.d.ts +43 -0
- package/out/runtime/util.d.ts.map +1 -0
- package/out/runtime/util.js +447 -0
- package/out/runtime/util.js.map +1 -0
- package/out/setupClassic.d.ts +98 -0
- package/out/setupClassic.d.ts.map +1 -0
- package/out/setupClassic.js +38 -0
- package/out/setupClassic.js.map +1 -0
- package/out/setupCommon.d.ts +2 -0
- package/out/setupCommon.d.ts.map +1 -0
- package/out/setupCommon.js +33 -0
- package/out/setupCommon.js.map +1 -0
- package/out/setupExtended.d.ts +40 -0
- package/out/setupExtended.d.ts.map +1 -0
- package/out/setupExtended.js +67 -0
- package/out/setupExtended.js.map +1 -0
- package/out/syntaxes/agentlang.monarch.d.ts +77 -0
- package/out/syntaxes/agentlang.monarch.d.ts.map +1 -0
- package/out/syntaxes/agentlang.monarch.js +31 -0
- package/out/syntaxes/agentlang.monarch.js.map +1 -0
- package/out/utils/fs/index.d.ts +14 -0
- package/out/utils/fs/index.d.ts.map +1 -0
- package/out/utils/fs/index.js +26 -0
- package/out/utils/fs/index.js.map +1 -0
- package/out/utils/fs/interfaces.d.ts +105 -0
- package/out/utils/fs/interfaces.d.ts.map +1 -0
- package/out/utils/fs/interfaces.js +5 -0
- package/out/utils/fs/interfaces.js.map +1 -0
- package/out/utils/fs/lightning-fs.d.ts +116 -0
- package/out/utils/fs/lightning-fs.d.ts.map +1 -0
- package/out/utils/fs/lightning-fs.js +243 -0
- package/out/utils/fs/lightning-fs.js.map +1 -0
- package/out/utils/fs/node-fs.d.ts +93 -0
- package/out/utils/fs/node-fs.d.ts.map +1 -0
- package/out/utils/fs/node-fs.js +169 -0
- package/out/utils/fs/node-fs.js.map +1 -0
- package/out/utils/fs-utils.d.ts +153 -0
- package/out/utils/fs-utils.d.ts.map +1 -0
- package/out/utils/fs-utils.js +271 -0
- package/out/utils/fs-utils.js.map +1 -0
- package/out/utils/runtime.d.ts +36 -0
- package/out/utils/runtime.d.ts.map +1 -0
- package/out/utils/runtime.js +39 -0
- package/out/utils/runtime.js.map +1 -0
- package/package.json +155 -0
- package/src/api/http.ts +361 -0
- package/src/cli/cli-util.ts +18 -0
- package/src/cli/main.ts +146 -0
- package/src/extension/main.ts +51 -0
- package/src/language/agentlang-module.ts +75 -0
- package/src/language/agentlang-validator.ts +60 -0
- package/src/language/agentlang.langium +178 -0
- package/src/language/generated/ast.ts +1698 -0
- package/src/language/generated/grammar.ts +4477 -0
- package/src/language/generated/module.ts +25 -0
- package/src/language/main-browser.ts +19 -0
- package/src/language/main.ts +13 -0
- package/src/language/parser.ts +329 -0
- package/src/language/syntax.ts +646 -0
- package/src/runtime/agents/common.ts +177 -0
- package/src/runtime/agents/impl/openai.ts +19 -0
- package/src/runtime/agents/provider.ts +58 -0
- package/src/runtime/agents/registry.ts +9 -0
- package/src/runtime/auth/cognito.ts +225 -0
- package/src/runtime/auth/defs.ts +33 -0
- package/src/runtime/auth/interface.ts +31 -0
- package/src/runtime/defs.ts +33 -0
- package/src/runtime/interpreter.ts +1352 -0
- package/src/runtime/loader.ts +450 -0
- package/src/runtime/logger.ts +51 -0
- package/src/runtime/module.ts +2188 -0
- package/src/runtime/modules/ai.ts +257 -0
- package/src/runtime/modules/auth.ts +489 -0
- package/src/runtime/modules/core.ts +95 -0
- package/src/runtime/relgraph.ts +195 -0
- package/src/runtime/resolvers/interface.ts +160 -0
- package/src/runtime/resolvers/registry.ts +30 -0
- package/src/runtime/resolvers/sqldb/database.ts +823 -0
- package/src/runtime/resolvers/sqldb/dbutil.ts +257 -0
- package/src/runtime/resolvers/sqldb/impl.ts +471 -0
- package/src/runtime/state.ts +87 -0
- package/src/runtime/util.ts +513 -0
- package/src/setupClassic.ts +43 -0
- package/src/setupCommon.ts +33 -0
- package/src/setupExtended.ts +79 -0
- package/src/syntaxes/agentlang.monarch.ts +31 -0
- package/src/utils/fs/index.ts +28 -0
- package/src/utils/fs/interfaces.ts +118 -0
- package/src/utils/fs/lightning-fs.ts +284 -0
- package/src/utils/fs/node-fs.ts +185 -0
- package/src/utils/fs-utils.ts +304 -0
- package/src/utils/runtime.ts +43 -0
|
@@ -0,0 +1,934 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
* This file was generated by langium-cli 3.5.0.
|
|
3
|
+
* DO NOT EDIT MANUALLY!
|
|
4
|
+
******************************************************************************/
|
|
5
|
+
import * as langium from 'langium';
|
|
6
|
+
export const AgentlangTerminals = {
|
|
7
|
+
ID: /(([_a-zA-Z][\w_]*)(\/([_a-zA-Z][\w_]*))?)/,
|
|
8
|
+
STRING: /(["'])((\\{2})*|(.*?[^\\](\\{2})*))\1/,
|
|
9
|
+
INT: /-?[0-9]+/,
|
|
10
|
+
WS: /\s+/,
|
|
11
|
+
ML_COMMENT: /\/\*[\s\S]*?\*\//,
|
|
12
|
+
SL_COMMENT: /\/\/[^\n\r]*/,
|
|
13
|
+
};
|
|
14
|
+
export const AttributeValueExpression = 'AttributeValueExpression';
|
|
15
|
+
export function isAttributeValueExpression(item) {
|
|
16
|
+
return reflection.isInstance(item, AttributeValueExpression);
|
|
17
|
+
}
|
|
18
|
+
export function isBoolean(item) {
|
|
19
|
+
return item === 'true' || item === 'false';
|
|
20
|
+
}
|
|
21
|
+
export function isDecimal(item) {
|
|
22
|
+
return typeof item === 'number';
|
|
23
|
+
}
|
|
24
|
+
export const Definition = 'Definition';
|
|
25
|
+
export function isDefinition(item) {
|
|
26
|
+
return reflection.isInstance(item, Definition);
|
|
27
|
+
}
|
|
28
|
+
export const Expr = 'Expr';
|
|
29
|
+
export function isExpr(item) {
|
|
30
|
+
return reflection.isInstance(item, Expr);
|
|
31
|
+
}
|
|
32
|
+
export const PrimExpr = 'PrimExpr';
|
|
33
|
+
export function isPrimExpr(item) {
|
|
34
|
+
return reflection.isInstance(item, PrimExpr);
|
|
35
|
+
}
|
|
36
|
+
export function isQueryId(item) {
|
|
37
|
+
return typeof item === 'string';
|
|
38
|
+
}
|
|
39
|
+
export function isRef(item) {
|
|
40
|
+
return typeof item === 'string';
|
|
41
|
+
}
|
|
42
|
+
export const SchemaDefinition = 'SchemaDefinition';
|
|
43
|
+
export function isSchemaDefinition(item) {
|
|
44
|
+
return reflection.isInstance(item, SchemaDefinition);
|
|
45
|
+
}
|
|
46
|
+
export function isTaggedId(item) {
|
|
47
|
+
return typeof item === 'string';
|
|
48
|
+
}
|
|
49
|
+
export const AfterTriggerDefinition = 'AfterTriggerDefinition';
|
|
50
|
+
export function isAfterTriggerDefinition(item) {
|
|
51
|
+
return reflection.isInstance(item, AfterTriggerDefinition);
|
|
52
|
+
}
|
|
53
|
+
export const AliasSpec = 'AliasSpec';
|
|
54
|
+
export function isAliasSpec(item) {
|
|
55
|
+
return reflection.isInstance(item, AliasSpec);
|
|
56
|
+
}
|
|
57
|
+
export const ArrayLiteral = 'ArrayLiteral';
|
|
58
|
+
export function isArrayLiteral(item) {
|
|
59
|
+
return reflection.isInstance(item, ArrayLiteral);
|
|
60
|
+
}
|
|
61
|
+
export const AsyncFnCall = 'AsyncFnCall';
|
|
62
|
+
export function isAsyncFnCall(item) {
|
|
63
|
+
return reflection.isInstance(item, AsyncFnCall);
|
|
64
|
+
}
|
|
65
|
+
export const AttributeDefinition = 'AttributeDefinition';
|
|
66
|
+
export function isAttributeDefinition(item) {
|
|
67
|
+
return reflection.isInstance(item, AttributeDefinition);
|
|
68
|
+
}
|
|
69
|
+
export const BeforeTriggerDefinition = 'BeforeTriggerDefinition';
|
|
70
|
+
export function isBeforeTriggerDefinition(item) {
|
|
71
|
+
return reflection.isInstance(item, BeforeTriggerDefinition);
|
|
72
|
+
}
|
|
73
|
+
export const BinExpr = 'BinExpr';
|
|
74
|
+
export function isBinExpr(item) {
|
|
75
|
+
return reflection.isInstance(item, BinExpr);
|
|
76
|
+
}
|
|
77
|
+
export const CatchSpec = 'CatchSpec';
|
|
78
|
+
export function isCatchSpec(item) {
|
|
79
|
+
return reflection.isInstance(item, CatchSpec);
|
|
80
|
+
}
|
|
81
|
+
export const CompositeUniqueDefinition = 'CompositeUniqueDefinition';
|
|
82
|
+
export function isCompositeUniqueDefinition(item) {
|
|
83
|
+
return reflection.isInstance(item, CompositeUniqueDefinition);
|
|
84
|
+
}
|
|
85
|
+
export const CrudMap = 'CrudMap';
|
|
86
|
+
export function isCrudMap(item) {
|
|
87
|
+
return reflection.isInstance(item, CrudMap);
|
|
88
|
+
}
|
|
89
|
+
export const Delete = 'Delete';
|
|
90
|
+
export function isDelete(item) {
|
|
91
|
+
return reflection.isInstance(item, Delete);
|
|
92
|
+
}
|
|
93
|
+
export const Else = 'Else';
|
|
94
|
+
export function isElse(item) {
|
|
95
|
+
return reflection.isInstance(item, Else);
|
|
96
|
+
}
|
|
97
|
+
export const EntityDefinition = 'EntityDefinition';
|
|
98
|
+
export function isEntityDefinition(item) {
|
|
99
|
+
return reflection.isInstance(item, EntityDefinition);
|
|
100
|
+
}
|
|
101
|
+
export const EnumSpec = 'EnumSpec';
|
|
102
|
+
export function isEnumSpec(item) {
|
|
103
|
+
return reflection.isInstance(item, EnumSpec);
|
|
104
|
+
}
|
|
105
|
+
export const EventDefinition = 'EventDefinition';
|
|
106
|
+
export function isEventDefinition(item) {
|
|
107
|
+
return reflection.isInstance(item, EventDefinition);
|
|
108
|
+
}
|
|
109
|
+
export const ExtendsClause = 'ExtendsClause';
|
|
110
|
+
export function isExtendsClause(item) {
|
|
111
|
+
return reflection.isInstance(item, ExtendsClause);
|
|
112
|
+
}
|
|
113
|
+
export const FnCall = 'FnCall';
|
|
114
|
+
export function isFnCall(item) {
|
|
115
|
+
return reflection.isInstance(item, FnCall);
|
|
116
|
+
}
|
|
117
|
+
export const ForEach = 'ForEach';
|
|
118
|
+
export function isForEach(item) {
|
|
119
|
+
return reflection.isInstance(item, ForEach);
|
|
120
|
+
}
|
|
121
|
+
export const FullTextSearch = 'FullTextSearch';
|
|
122
|
+
export function isFullTextSearch(item) {
|
|
123
|
+
return reflection.isInstance(item, FullTextSearch);
|
|
124
|
+
}
|
|
125
|
+
export const Group = 'Group';
|
|
126
|
+
export function isGroup(item) {
|
|
127
|
+
return reflection.isInstance(item, Group);
|
|
128
|
+
}
|
|
129
|
+
export const Handler = 'Handler';
|
|
130
|
+
export function isHandler(item) {
|
|
131
|
+
return reflection.isInstance(item, Handler);
|
|
132
|
+
}
|
|
133
|
+
export const If = 'If';
|
|
134
|
+
export function isIf(item) {
|
|
135
|
+
return reflection.isInstance(item, If);
|
|
136
|
+
}
|
|
137
|
+
export const Import = 'Import';
|
|
138
|
+
export function isImport(item) {
|
|
139
|
+
return reflection.isInstance(item, Import);
|
|
140
|
+
}
|
|
141
|
+
export const KvPair = 'KvPair';
|
|
142
|
+
export function isKvPair(item) {
|
|
143
|
+
return reflection.isInstance(item, KvPair);
|
|
144
|
+
}
|
|
145
|
+
export const KvPairs = 'KvPairs';
|
|
146
|
+
export function isKvPairs(item) {
|
|
147
|
+
return reflection.isInstance(item, KvPairs);
|
|
148
|
+
}
|
|
149
|
+
export const Literal = 'Literal';
|
|
150
|
+
export function isLiteral(item) {
|
|
151
|
+
return reflection.isInstance(item, Literal);
|
|
152
|
+
}
|
|
153
|
+
export const MapEntry = 'MapEntry';
|
|
154
|
+
export function isMapEntry(item) {
|
|
155
|
+
return reflection.isInstance(item, MapEntry);
|
|
156
|
+
}
|
|
157
|
+
export const MapKey = 'MapKey';
|
|
158
|
+
export function isMapKey(item) {
|
|
159
|
+
return reflection.isInstance(item, MapKey);
|
|
160
|
+
}
|
|
161
|
+
export const MapLiteral = 'MapLiteral';
|
|
162
|
+
export function isMapLiteral(item) {
|
|
163
|
+
return reflection.isInstance(item, MapLiteral);
|
|
164
|
+
}
|
|
165
|
+
export const MetaDefinition = 'MetaDefinition';
|
|
166
|
+
export function isMetaDefinition(item) {
|
|
167
|
+
return reflection.isInstance(item, MetaDefinition);
|
|
168
|
+
}
|
|
169
|
+
export const ModuleDefinition = 'ModuleDefinition';
|
|
170
|
+
export function isModuleDefinition(item) {
|
|
171
|
+
return reflection.isInstance(item, ModuleDefinition);
|
|
172
|
+
}
|
|
173
|
+
export const NegExpr = 'NegExpr';
|
|
174
|
+
export function isNegExpr(item) {
|
|
175
|
+
return reflection.isInstance(item, NegExpr);
|
|
176
|
+
}
|
|
177
|
+
export const NodeDefinition = 'NodeDefinition';
|
|
178
|
+
export function isNodeDefinition(item) {
|
|
179
|
+
return reflection.isInstance(item, NodeDefinition);
|
|
180
|
+
}
|
|
181
|
+
export const NotExpr = 'NotExpr';
|
|
182
|
+
export function isNotExpr(item) {
|
|
183
|
+
return reflection.isInstance(item, NotExpr);
|
|
184
|
+
}
|
|
185
|
+
export const OneOfSpec = 'OneOfSpec';
|
|
186
|
+
export function isOneOfSpec(item) {
|
|
187
|
+
return reflection.isInstance(item, OneOfSpec);
|
|
188
|
+
}
|
|
189
|
+
export const Pattern = 'Pattern';
|
|
190
|
+
export function isPattern(item) {
|
|
191
|
+
return reflection.isInstance(item, Pattern);
|
|
192
|
+
}
|
|
193
|
+
export const PrePostTriggerDefinition = 'PrePostTriggerDefinition';
|
|
194
|
+
export function isPrePostTriggerDefinition(item) {
|
|
195
|
+
return reflection.isInstance(item, PrePostTriggerDefinition);
|
|
196
|
+
}
|
|
197
|
+
export const PropertyDefinition = 'PropertyDefinition';
|
|
198
|
+
export function isPropertyDefinition(item) {
|
|
199
|
+
return reflection.isInstance(item, PropertyDefinition);
|
|
200
|
+
}
|
|
201
|
+
export const Purge = 'Purge';
|
|
202
|
+
export function isPurge(item) {
|
|
203
|
+
return reflection.isInstance(item, Purge);
|
|
204
|
+
}
|
|
205
|
+
export const RbacAllowSpec = 'RbacAllowSpec';
|
|
206
|
+
export function isRbacAllowSpec(item) {
|
|
207
|
+
return reflection.isInstance(item, RbacAllowSpec);
|
|
208
|
+
}
|
|
209
|
+
export const RbacExpressionSpec = 'RbacExpressionSpec';
|
|
210
|
+
export function isRbacExpressionSpec(item) {
|
|
211
|
+
return reflection.isInstance(item, RbacExpressionSpec);
|
|
212
|
+
}
|
|
213
|
+
export const RbacOpr = 'RbacOpr';
|
|
214
|
+
export function isRbacOpr(item) {
|
|
215
|
+
return reflection.isInstance(item, RbacOpr);
|
|
216
|
+
}
|
|
217
|
+
export const RbacRolesSpec = 'RbacRolesSpec';
|
|
218
|
+
export function isRbacRolesSpec(item) {
|
|
219
|
+
return reflection.isInstance(item, RbacRolesSpec);
|
|
220
|
+
}
|
|
221
|
+
export const RbacSpecDefinition = 'RbacSpecDefinition';
|
|
222
|
+
export function isRbacSpecDefinition(item) {
|
|
223
|
+
return reflection.isInstance(item, RbacSpecDefinition);
|
|
224
|
+
}
|
|
225
|
+
export const RbacSpecEntries = 'RbacSpecEntries';
|
|
226
|
+
export function isRbacSpecEntries(item) {
|
|
227
|
+
return reflection.isInstance(item, RbacSpecEntries);
|
|
228
|
+
}
|
|
229
|
+
export const RbacSpecEntry = 'RbacSpecEntry';
|
|
230
|
+
export function isRbacSpecEntry(item) {
|
|
231
|
+
return reflection.isInstance(item, RbacSpecEntry);
|
|
232
|
+
}
|
|
233
|
+
export const RecordDefinition = 'RecordDefinition';
|
|
234
|
+
export function isRecordDefinition(item) {
|
|
235
|
+
return reflection.isInstance(item, RecordDefinition);
|
|
236
|
+
}
|
|
237
|
+
export const RecordExtraDefinition = 'RecordExtraDefinition';
|
|
238
|
+
export function isRecordExtraDefinition(item) {
|
|
239
|
+
return reflection.isInstance(item, RecordExtraDefinition);
|
|
240
|
+
}
|
|
241
|
+
export const RecordSchemaDefinition = 'RecordSchemaDefinition';
|
|
242
|
+
export function isRecordSchemaDefinition(item) {
|
|
243
|
+
return reflection.isInstance(item, RecordSchemaDefinition);
|
|
244
|
+
}
|
|
245
|
+
export const RefSpec = 'RefSpec';
|
|
246
|
+
export function isRefSpec(item) {
|
|
247
|
+
return reflection.isInstance(item, RefSpec);
|
|
248
|
+
}
|
|
249
|
+
export const RelationshipDefinition = 'RelationshipDefinition';
|
|
250
|
+
export function isRelationshipDefinition(item) {
|
|
251
|
+
return reflection.isInstance(item, RelationshipDefinition);
|
|
252
|
+
}
|
|
253
|
+
export const RelationshipPattern = 'RelationshipPattern';
|
|
254
|
+
export function isRelationshipPattern(item) {
|
|
255
|
+
return reflection.isInstance(item, RelationshipPattern);
|
|
256
|
+
}
|
|
257
|
+
export const RelNodes = 'RelNodes';
|
|
258
|
+
export function isRelNodes(item) {
|
|
259
|
+
return reflection.isInstance(item, RelNodes);
|
|
260
|
+
}
|
|
261
|
+
export const RuntimeHint = 'RuntimeHint';
|
|
262
|
+
export function isRuntimeHint(item) {
|
|
263
|
+
return reflection.isInstance(item, RuntimeHint);
|
|
264
|
+
}
|
|
265
|
+
export const SelectIntoEntry = 'SelectIntoEntry';
|
|
266
|
+
export function isSelectIntoEntry(item) {
|
|
267
|
+
return reflection.isInstance(item, SelectIntoEntry);
|
|
268
|
+
}
|
|
269
|
+
export const SelectIntoSpec = 'SelectIntoSpec';
|
|
270
|
+
export function isSelectIntoSpec(item) {
|
|
271
|
+
return reflection.isInstance(item, SelectIntoSpec);
|
|
272
|
+
}
|
|
273
|
+
export const SetAttribute = 'SetAttribute';
|
|
274
|
+
export function isSetAttribute(item) {
|
|
275
|
+
return reflection.isInstance(item, SetAttribute);
|
|
276
|
+
}
|
|
277
|
+
export const StandaloneStatement = 'StandaloneStatement';
|
|
278
|
+
export function isStandaloneStatement(item) {
|
|
279
|
+
return reflection.isInstance(item, StandaloneStatement);
|
|
280
|
+
}
|
|
281
|
+
export const Statement = 'Statement';
|
|
282
|
+
export function isStatement(item) {
|
|
283
|
+
return reflection.isInstance(item, Statement);
|
|
284
|
+
}
|
|
285
|
+
export const TriggerDefinition = 'TriggerDefinition';
|
|
286
|
+
export function isTriggerDefinition(item) {
|
|
287
|
+
return reflection.isInstance(item, TriggerDefinition);
|
|
288
|
+
}
|
|
289
|
+
export const TriggerEntry = 'TriggerEntry';
|
|
290
|
+
export function isTriggerEntry(item) {
|
|
291
|
+
return reflection.isInstance(item, TriggerEntry);
|
|
292
|
+
}
|
|
293
|
+
export const Upsert = 'Upsert';
|
|
294
|
+
export function isUpsert(item) {
|
|
295
|
+
return reflection.isInstance(item, Upsert);
|
|
296
|
+
}
|
|
297
|
+
export const WorkflowDefinition = 'WorkflowDefinition';
|
|
298
|
+
export function isWorkflowDefinition(item) {
|
|
299
|
+
return reflection.isInstance(item, WorkflowDefinition);
|
|
300
|
+
}
|
|
301
|
+
export class AgentlangAstReflection extends langium.AbstractAstReflection {
|
|
302
|
+
getAllTypes() {
|
|
303
|
+
return [AfterTriggerDefinition, AliasSpec, ArrayLiteral, AsyncFnCall, AttributeDefinition, AttributeValueExpression, BeforeTriggerDefinition, BinExpr, CatchSpec, CompositeUniqueDefinition, CrudMap, Definition, Delete, Else, EntityDefinition, EnumSpec, EventDefinition, Expr, ExtendsClause, FnCall, ForEach, FullTextSearch, Group, Handler, If, Import, KvPair, KvPairs, Literal, MapEntry, MapKey, MapLiteral, MetaDefinition, ModuleDefinition, NegExpr, NodeDefinition, NotExpr, OneOfSpec, Pattern, PrePostTriggerDefinition, PrimExpr, PropertyDefinition, Purge, RbacAllowSpec, RbacExpressionSpec, RbacOpr, RbacRolesSpec, RbacSpecDefinition, RbacSpecEntries, RbacSpecEntry, RecordDefinition, RecordExtraDefinition, RecordSchemaDefinition, RefSpec, RelNodes, RelationshipDefinition, RelationshipPattern, RuntimeHint, SchemaDefinition, SelectIntoEntry, SelectIntoSpec, SetAttribute, StandaloneStatement, Statement, TriggerDefinition, TriggerEntry, Upsert, WorkflowDefinition];
|
|
304
|
+
}
|
|
305
|
+
computeIsSubtype(subtype, supertype) {
|
|
306
|
+
switch (subtype) {
|
|
307
|
+
case BinExpr:
|
|
308
|
+
case PrimExpr: {
|
|
309
|
+
return this.isSubtype(Expr, supertype);
|
|
310
|
+
}
|
|
311
|
+
case EntityDefinition:
|
|
312
|
+
case EventDefinition:
|
|
313
|
+
case RecordDefinition: {
|
|
314
|
+
return this.isSubtype(SchemaDefinition, supertype);
|
|
315
|
+
}
|
|
316
|
+
case Expr: {
|
|
317
|
+
return this.isSubtype(AttributeValueExpression, supertype);
|
|
318
|
+
}
|
|
319
|
+
case Group:
|
|
320
|
+
case Literal:
|
|
321
|
+
case NegExpr:
|
|
322
|
+
case NotExpr: {
|
|
323
|
+
return this.isSubtype(PrimExpr, supertype);
|
|
324
|
+
}
|
|
325
|
+
case RelationshipDefinition:
|
|
326
|
+
case SchemaDefinition:
|
|
327
|
+
case StandaloneStatement:
|
|
328
|
+
case WorkflowDefinition: {
|
|
329
|
+
return this.isSubtype(Definition, supertype);
|
|
330
|
+
}
|
|
331
|
+
default: {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
getReferenceType(refInfo) {
|
|
337
|
+
const referenceId = `${refInfo.container.$type}:${refInfo.property}`;
|
|
338
|
+
switch (referenceId) {
|
|
339
|
+
default: {
|
|
340
|
+
throw new Error(`${referenceId} is not a valid reference id.`);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
getTypeMetaData(type) {
|
|
345
|
+
switch (type) {
|
|
346
|
+
case AfterTriggerDefinition: {
|
|
347
|
+
return {
|
|
348
|
+
name: AfterTriggerDefinition,
|
|
349
|
+
properties: [
|
|
350
|
+
{ name: 'triggers' }
|
|
351
|
+
]
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
case AliasSpec: {
|
|
355
|
+
return {
|
|
356
|
+
name: AliasSpec,
|
|
357
|
+
properties: [
|
|
358
|
+
{ name: 'alias' },
|
|
359
|
+
{ name: 'aliases', defaultValue: [] }
|
|
360
|
+
]
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
case ArrayLiteral: {
|
|
364
|
+
return {
|
|
365
|
+
name: ArrayLiteral,
|
|
366
|
+
properties: [
|
|
367
|
+
{ name: 'vals', defaultValue: [] }
|
|
368
|
+
]
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
case AsyncFnCall: {
|
|
372
|
+
return {
|
|
373
|
+
name: AsyncFnCall,
|
|
374
|
+
properties: [
|
|
375
|
+
{ name: 'fnCall' }
|
|
376
|
+
]
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
case AttributeDefinition: {
|
|
380
|
+
return {
|
|
381
|
+
name: AttributeDefinition,
|
|
382
|
+
properties: [
|
|
383
|
+
{ name: 'arrayType' },
|
|
384
|
+
{ name: 'enumSpec' },
|
|
385
|
+
{ name: 'expr' },
|
|
386
|
+
{ name: 'name' },
|
|
387
|
+
{ name: 'oneOfSpec' },
|
|
388
|
+
{ name: 'properties', defaultValue: [] },
|
|
389
|
+
{ name: 'refSpec' },
|
|
390
|
+
{ name: 'type' }
|
|
391
|
+
]
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
case BeforeTriggerDefinition: {
|
|
395
|
+
return {
|
|
396
|
+
name: BeforeTriggerDefinition,
|
|
397
|
+
properties: [
|
|
398
|
+
{ name: 'triggers' }
|
|
399
|
+
]
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
case BinExpr: {
|
|
403
|
+
return {
|
|
404
|
+
name: BinExpr,
|
|
405
|
+
properties: [
|
|
406
|
+
{ name: 'e1' },
|
|
407
|
+
{ name: 'e2' },
|
|
408
|
+
{ name: 'op' }
|
|
409
|
+
]
|
|
410
|
+
};
|
|
411
|
+
}
|
|
412
|
+
case CatchSpec: {
|
|
413
|
+
return {
|
|
414
|
+
name: CatchSpec,
|
|
415
|
+
properties: [
|
|
416
|
+
{ name: 'handlers', defaultValue: [] }
|
|
417
|
+
]
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
case CompositeUniqueDefinition: {
|
|
421
|
+
return {
|
|
422
|
+
name: CompositeUniqueDefinition,
|
|
423
|
+
properties: [
|
|
424
|
+
{ name: 'attrs', defaultValue: [] }
|
|
425
|
+
]
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
case CrudMap: {
|
|
429
|
+
return {
|
|
430
|
+
name: CrudMap,
|
|
431
|
+
properties: [
|
|
432
|
+
{ name: 'attributes', defaultValue: [] },
|
|
433
|
+
{ name: 'into' },
|
|
434
|
+
{ name: 'name' },
|
|
435
|
+
{ name: 'properties', defaultValue: [] },
|
|
436
|
+
{ name: 'relationships', defaultValue: [] }
|
|
437
|
+
]
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
case Delete: {
|
|
441
|
+
return {
|
|
442
|
+
name: Delete,
|
|
443
|
+
properties: [
|
|
444
|
+
{ name: 'pattern' }
|
|
445
|
+
]
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
case Else: {
|
|
449
|
+
return {
|
|
450
|
+
name: Else,
|
|
451
|
+
properties: [
|
|
452
|
+
{ name: 'statements', defaultValue: [] }
|
|
453
|
+
]
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
case EntityDefinition: {
|
|
457
|
+
return {
|
|
458
|
+
name: EntityDefinition,
|
|
459
|
+
properties: [
|
|
460
|
+
{ name: 'extends' },
|
|
461
|
+
{ name: 'name' },
|
|
462
|
+
{ name: 'schema' }
|
|
463
|
+
]
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
case EnumSpec: {
|
|
467
|
+
return {
|
|
468
|
+
name: EnumSpec,
|
|
469
|
+
properties: [
|
|
470
|
+
{ name: 'values', defaultValue: [] }
|
|
471
|
+
]
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
case EventDefinition: {
|
|
475
|
+
return {
|
|
476
|
+
name: EventDefinition,
|
|
477
|
+
properties: [
|
|
478
|
+
{ name: 'extends' },
|
|
479
|
+
{ name: 'name' },
|
|
480
|
+
{ name: 'schema' }
|
|
481
|
+
]
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
case ExtendsClause: {
|
|
485
|
+
return {
|
|
486
|
+
name: ExtendsClause,
|
|
487
|
+
properties: [
|
|
488
|
+
{ name: 'parentName' }
|
|
489
|
+
]
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
case FnCall: {
|
|
493
|
+
return {
|
|
494
|
+
name: FnCall,
|
|
495
|
+
properties: [
|
|
496
|
+
{ name: 'args', defaultValue: [] },
|
|
497
|
+
{ name: 'name' }
|
|
498
|
+
]
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
case ForEach: {
|
|
502
|
+
return {
|
|
503
|
+
name: ForEach,
|
|
504
|
+
properties: [
|
|
505
|
+
{ name: 'src' },
|
|
506
|
+
{ name: 'statements', defaultValue: [] },
|
|
507
|
+
{ name: 'var' }
|
|
508
|
+
]
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
case FullTextSearch: {
|
|
512
|
+
return {
|
|
513
|
+
name: FullTextSearch,
|
|
514
|
+
properties: [
|
|
515
|
+
{ name: 'name' },
|
|
516
|
+
{ name: 'options' },
|
|
517
|
+
{ name: 'query' }
|
|
518
|
+
]
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
case Group: {
|
|
522
|
+
return {
|
|
523
|
+
name: Group,
|
|
524
|
+
properties: [
|
|
525
|
+
{ name: 'ge' }
|
|
526
|
+
]
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
case Handler: {
|
|
530
|
+
return {
|
|
531
|
+
name: Handler,
|
|
532
|
+
properties: [
|
|
533
|
+
{ name: 'except' },
|
|
534
|
+
{ name: 'stmt' }
|
|
535
|
+
]
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
case If: {
|
|
539
|
+
return {
|
|
540
|
+
name: If,
|
|
541
|
+
properties: [
|
|
542
|
+
{ name: 'cond' },
|
|
543
|
+
{ name: 'else' },
|
|
544
|
+
{ name: 'statements', defaultValue: [] }
|
|
545
|
+
]
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
case Import: {
|
|
549
|
+
return {
|
|
550
|
+
name: Import,
|
|
551
|
+
properties: [
|
|
552
|
+
{ name: 'name' },
|
|
553
|
+
{ name: 'path' }
|
|
554
|
+
]
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
case KvPair: {
|
|
558
|
+
return {
|
|
559
|
+
name: KvPair,
|
|
560
|
+
properties: [
|
|
561
|
+
{ name: 'key' },
|
|
562
|
+
{ name: 'value' }
|
|
563
|
+
]
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
case KvPairs: {
|
|
567
|
+
return {
|
|
568
|
+
name: KvPairs,
|
|
569
|
+
properties: [
|
|
570
|
+
{ name: 'pairs', defaultValue: [] }
|
|
571
|
+
]
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
case Literal: {
|
|
575
|
+
return {
|
|
576
|
+
name: Literal,
|
|
577
|
+
properties: [
|
|
578
|
+
{ name: 'array' },
|
|
579
|
+
{ name: 'asyncFnCall' },
|
|
580
|
+
{ name: 'bool' },
|
|
581
|
+
{ name: 'fnCall' },
|
|
582
|
+
{ name: 'id' },
|
|
583
|
+
{ name: 'map' },
|
|
584
|
+
{ name: 'num' },
|
|
585
|
+
{ name: 'ref' },
|
|
586
|
+
{ name: 'str' }
|
|
587
|
+
]
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
case MapEntry: {
|
|
591
|
+
return {
|
|
592
|
+
name: MapEntry,
|
|
593
|
+
properties: [
|
|
594
|
+
{ name: 'key' },
|
|
595
|
+
{ name: 'value' }
|
|
596
|
+
]
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
case MapKey: {
|
|
600
|
+
return {
|
|
601
|
+
name: MapKey,
|
|
602
|
+
properties: [
|
|
603
|
+
{ name: 'bool' },
|
|
604
|
+
{ name: 'num' },
|
|
605
|
+
{ name: 'str' }
|
|
606
|
+
]
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
case MapLiteral: {
|
|
610
|
+
return {
|
|
611
|
+
name: MapLiteral,
|
|
612
|
+
properties: [
|
|
613
|
+
{ name: 'entries', defaultValue: [] }
|
|
614
|
+
]
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
case MetaDefinition: {
|
|
618
|
+
return {
|
|
619
|
+
name: MetaDefinition,
|
|
620
|
+
properties: [
|
|
621
|
+
{ name: 'spec' }
|
|
622
|
+
]
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
case ModuleDefinition: {
|
|
626
|
+
return {
|
|
627
|
+
name: ModuleDefinition,
|
|
628
|
+
properties: [
|
|
629
|
+
{ name: 'defs', defaultValue: [] },
|
|
630
|
+
{ name: 'imports', defaultValue: [] },
|
|
631
|
+
{ name: 'name' }
|
|
632
|
+
]
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
case NegExpr: {
|
|
636
|
+
return {
|
|
637
|
+
name: NegExpr,
|
|
638
|
+
properties: [
|
|
639
|
+
{ name: 'ne' }
|
|
640
|
+
]
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
case NodeDefinition: {
|
|
644
|
+
return {
|
|
645
|
+
name: NodeDefinition,
|
|
646
|
+
properties: [
|
|
647
|
+
{ name: 'alias' },
|
|
648
|
+
{ name: 'name' }
|
|
649
|
+
]
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
case NotExpr: {
|
|
653
|
+
return {
|
|
654
|
+
name: NotExpr,
|
|
655
|
+
properties: [
|
|
656
|
+
{ name: 'ne' }
|
|
657
|
+
]
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
case OneOfSpec: {
|
|
661
|
+
return {
|
|
662
|
+
name: OneOfSpec,
|
|
663
|
+
properties: [
|
|
664
|
+
{ name: 'ref' }
|
|
665
|
+
]
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
case Pattern: {
|
|
669
|
+
return {
|
|
670
|
+
name: Pattern,
|
|
671
|
+
properties: [
|
|
672
|
+
{ name: 'crudMap' },
|
|
673
|
+
{ name: 'delete' },
|
|
674
|
+
{ name: 'forEach' },
|
|
675
|
+
{ name: 'fullTextSearch' },
|
|
676
|
+
{ name: 'if' },
|
|
677
|
+
{ name: 'literal' },
|
|
678
|
+
{ name: 'purge' },
|
|
679
|
+
{ name: 'upsert' }
|
|
680
|
+
]
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
case PrePostTriggerDefinition: {
|
|
684
|
+
return {
|
|
685
|
+
name: PrePostTriggerDefinition,
|
|
686
|
+
properties: [
|
|
687
|
+
{ name: 'after' },
|
|
688
|
+
{ name: 'before' }
|
|
689
|
+
]
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
case PropertyDefinition: {
|
|
693
|
+
return {
|
|
694
|
+
name: PropertyDefinition,
|
|
695
|
+
properties: [
|
|
696
|
+
{ name: 'name' },
|
|
697
|
+
{ name: 'value' }
|
|
698
|
+
]
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
case Purge: {
|
|
702
|
+
return {
|
|
703
|
+
name: Purge,
|
|
704
|
+
properties: [
|
|
705
|
+
{ name: 'pattern' }
|
|
706
|
+
]
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
case RbacAllowSpec: {
|
|
710
|
+
return {
|
|
711
|
+
name: RbacAllowSpec,
|
|
712
|
+
properties: [
|
|
713
|
+
{ name: 'oprs', defaultValue: [] }
|
|
714
|
+
]
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
case RbacExpressionSpec: {
|
|
718
|
+
return {
|
|
719
|
+
name: RbacExpressionSpec,
|
|
720
|
+
properties: [
|
|
721
|
+
{ name: 'lhs' },
|
|
722
|
+
{ name: 'rhs' }
|
|
723
|
+
]
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
case RbacOpr: {
|
|
727
|
+
return {
|
|
728
|
+
name: RbacOpr,
|
|
729
|
+
properties: [
|
|
730
|
+
{ name: 'value' }
|
|
731
|
+
]
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
case RbacRolesSpec: {
|
|
735
|
+
return {
|
|
736
|
+
name: RbacRolesSpec,
|
|
737
|
+
properties: [
|
|
738
|
+
{ name: 'roles', defaultValue: [] }
|
|
739
|
+
]
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
case RbacSpecDefinition: {
|
|
743
|
+
return {
|
|
744
|
+
name: RbacSpecDefinition,
|
|
745
|
+
properties: [
|
|
746
|
+
{ name: 'specEntries', defaultValue: [] }
|
|
747
|
+
]
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
case RbacSpecEntries: {
|
|
751
|
+
return {
|
|
752
|
+
name: RbacSpecEntries,
|
|
753
|
+
properties: [
|
|
754
|
+
{ name: 'entries', defaultValue: [] }
|
|
755
|
+
]
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
case RbacSpecEntry: {
|
|
759
|
+
return {
|
|
760
|
+
name: RbacSpecEntry,
|
|
761
|
+
properties: [
|
|
762
|
+
{ name: 'allow' },
|
|
763
|
+
{ name: 'expr' },
|
|
764
|
+
{ name: 'role' }
|
|
765
|
+
]
|
|
766
|
+
};
|
|
767
|
+
}
|
|
768
|
+
case RecordDefinition: {
|
|
769
|
+
return {
|
|
770
|
+
name: RecordDefinition,
|
|
771
|
+
properties: [
|
|
772
|
+
{ name: 'extends' },
|
|
773
|
+
{ name: 'name' },
|
|
774
|
+
{ name: 'schema' }
|
|
775
|
+
]
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
case RecordExtraDefinition: {
|
|
779
|
+
return {
|
|
780
|
+
name: RecordExtraDefinition,
|
|
781
|
+
properties: [
|
|
782
|
+
{ name: 'meta' },
|
|
783
|
+
{ name: 'prePost' },
|
|
784
|
+
{ name: 'rbacSpec' },
|
|
785
|
+
{ name: 'uq' }
|
|
786
|
+
]
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
case RecordSchemaDefinition: {
|
|
790
|
+
return {
|
|
791
|
+
name: RecordSchemaDefinition,
|
|
792
|
+
properties: [
|
|
793
|
+
{ name: 'attributes', defaultValue: [] },
|
|
794
|
+
{ name: 'extras', defaultValue: [] }
|
|
795
|
+
]
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
case RefSpec: {
|
|
799
|
+
return {
|
|
800
|
+
name: RefSpec,
|
|
801
|
+
properties: [
|
|
802
|
+
{ name: 'ref' }
|
|
803
|
+
]
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
case RelationshipDefinition: {
|
|
807
|
+
return {
|
|
808
|
+
name: RelationshipDefinition,
|
|
809
|
+
properties: [
|
|
810
|
+
{ name: 'name' },
|
|
811
|
+
{ name: 'nodes' },
|
|
812
|
+
{ name: 'properties', defaultValue: [] },
|
|
813
|
+
{ name: 'schema' },
|
|
814
|
+
{ name: 'type' }
|
|
815
|
+
]
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
case RelationshipPattern: {
|
|
819
|
+
return {
|
|
820
|
+
name: RelationshipPattern,
|
|
821
|
+
properties: [
|
|
822
|
+
{ name: 'name' },
|
|
823
|
+
{ name: 'pattern' }
|
|
824
|
+
]
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
case RelNodes: {
|
|
828
|
+
return {
|
|
829
|
+
name: RelNodes,
|
|
830
|
+
properties: [
|
|
831
|
+
{ name: 'node1' },
|
|
832
|
+
{ name: 'node2' }
|
|
833
|
+
]
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
case RuntimeHint: {
|
|
837
|
+
return {
|
|
838
|
+
name: RuntimeHint,
|
|
839
|
+
properties: [
|
|
840
|
+
{ name: 'aliasSpec' },
|
|
841
|
+
{ name: 'catchSpec' }
|
|
842
|
+
]
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
case SelectIntoEntry: {
|
|
846
|
+
return {
|
|
847
|
+
name: SelectIntoEntry,
|
|
848
|
+
properties: [
|
|
849
|
+
{ name: 'alias' },
|
|
850
|
+
{ name: 'attribute' }
|
|
851
|
+
]
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
case SelectIntoSpec: {
|
|
855
|
+
return {
|
|
856
|
+
name: SelectIntoSpec,
|
|
857
|
+
properties: [
|
|
858
|
+
{ name: 'entries', defaultValue: [] }
|
|
859
|
+
]
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
case SetAttribute: {
|
|
863
|
+
return {
|
|
864
|
+
name: SetAttribute,
|
|
865
|
+
properties: [
|
|
866
|
+
{ name: 'name' },
|
|
867
|
+
{ name: 'op' },
|
|
868
|
+
{ name: 'value' }
|
|
869
|
+
]
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
case StandaloneStatement: {
|
|
873
|
+
return {
|
|
874
|
+
name: StandaloneStatement,
|
|
875
|
+
properties: [
|
|
876
|
+
{ name: 'stmt' }
|
|
877
|
+
]
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
case Statement: {
|
|
881
|
+
return {
|
|
882
|
+
name: Statement,
|
|
883
|
+
properties: [
|
|
884
|
+
{ name: 'hints', defaultValue: [] },
|
|
885
|
+
{ name: 'pattern' }
|
|
886
|
+
]
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
case TriggerDefinition: {
|
|
890
|
+
return {
|
|
891
|
+
name: TriggerDefinition,
|
|
892
|
+
properties: [
|
|
893
|
+
{ name: 'entries', defaultValue: [] }
|
|
894
|
+
]
|
|
895
|
+
};
|
|
896
|
+
}
|
|
897
|
+
case TriggerEntry: {
|
|
898
|
+
return {
|
|
899
|
+
name: TriggerEntry,
|
|
900
|
+
properties: [
|
|
901
|
+
{ name: 'async' },
|
|
902
|
+
{ name: 'event' },
|
|
903
|
+
{ name: 'on' }
|
|
904
|
+
]
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
case Upsert: {
|
|
908
|
+
return {
|
|
909
|
+
name: Upsert,
|
|
910
|
+
properties: [
|
|
911
|
+
{ name: 'pattern' }
|
|
912
|
+
]
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
case WorkflowDefinition: {
|
|
916
|
+
return {
|
|
917
|
+
name: WorkflowDefinition,
|
|
918
|
+
properties: [
|
|
919
|
+
{ name: 'name' },
|
|
920
|
+
{ name: 'statements', defaultValue: [] }
|
|
921
|
+
]
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
default: {
|
|
925
|
+
return {
|
|
926
|
+
name: type,
|
|
927
|
+
properties: []
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
export const reflection = new AgentlangAstReflection();
|
|
934
|
+
//# sourceMappingURL=ast.js.map
|