/****************************************************************************** * This file was generated by langium-cli 3.5.0. * DO NOT EDIT MANUALLY! ******************************************************************************/ import * as langium from 'langium'; export declare const AgentlangTerminals: { ID: RegExp; STRING: RegExp; INT: RegExp; WS: RegExp; ML_COMMENT: RegExp; SL_COMMENT: RegExp; }; export type AgentlangTerminalNames = keyof typeof AgentlangTerminals; export type AgentlangKeywordNames = "#" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | "<" | "<=" | "<>" | "=" | ">" | ">=" | "?" | "@" | "@oneof" | "@rbac" | "[" | "]" | "allow" | "and" | "as" | "await" | "between" | "contains" | "create" | "delete" | "else" | "entity" | "error" | "event" | "extends" | "false" | "for" | "if" | "import" | "in" | "like" | "module" | "not" | "not_found" | "or" | "purge" | "read" | "record" | "relationship" | "roles" | "throws" | "true" | "update" | "upsert" | "where" | "workflow" | "{" | "}"; export type AgentlangTokenNames = AgentlangTerminalNames | AgentlangKeywordNames; export type AttributeValueExpression = Expr; export declare const AttributeValueExpression = "AttributeValueExpression"; export declare function isAttributeValueExpression(item: unknown): item is AttributeValueExpression; export type Boolean = 'false' | 'true'; export declare function isBoolean(item: unknown): item is Boolean; export type Decimal = number; export declare function isDecimal(item: unknown): item is Decimal; export type Definition = RelationshipDefinition | SchemaDef | StandaloneStatement | WorkflowDefinition; export declare const Definition = "Definition"; export declare function isDefinition(item: unknown): item is Definition; export type Expr = BinExpr | PrimExpr; export declare const Expr = "Expr"; export declare function isExpr(item: unknown): item is Expr; export type Handler = Statement; export declare const Handler = "Handler"; export declare function isHandler(item: unknown): item is Handler; export type PrimExpr = Group | Literal | NegExpr | NotExpr; export declare const PrimExpr = "PrimExpr"; export declare function isPrimExpr(item: unknown): item is PrimExpr; export type QueryId = string; export declare function isQueryId(item: unknown): item is QueryId; export type Ref = string; export declare function isRef(item: unknown): item is Ref; export type SchemaDef = EntityDefinition | EventDefinition | RecordDefinition; export declare const SchemaDef = "SchemaDef"; export declare function isSchemaDef(item: unknown): item is SchemaDef; export type TaggedId = string; export declare function isTaggedId(item: unknown): item is TaggedId; export interface ArrayLiteral extends langium.AstNode { readonly $container: Literal; readonly $type: 'ArrayLiteral'; vals: Array; } export declare const ArrayLiteral = "ArrayLiteral"; export declare function isArrayLiteral(item: unknown): item is ArrayLiteral; export interface AsyncFnCall extends langium.AstNode { readonly $container: Literal; readonly $type: 'AsyncFnCall'; fnCall: FnCall; } export declare const AsyncFnCall = "AsyncFnCall"; export declare function isAsyncFnCall(item: unknown): item is AsyncFnCall; export interface AttributeDefinition extends langium.AstNode { readonly $container: RecAttrs | RelationshipDefinition; readonly $type: 'AttributeDefinition'; arrayType?: string; name: string; oneOfSpec?: OneOfSpec; properties: Array; type?: string; } export declare const AttributeDefinition = "AttributeDefinition"; export declare function isAttributeDefinition(item: unknown): item is AttributeDefinition; export interface BinExpr extends langium.AstNode { readonly $container: BinExpr | Group | If | NegExpr | NotExpr | SetAttribute; readonly $type: 'BinExpr'; e1: Expr | PrimExpr; e2: Expr | PrimExpr; op: '*' | '+' | '-' | '/' | '<' | '<=' | '<>' | '=' | '>' | '>=' | 'and' | 'in' | 'like' | 'or'; } export declare const BinExpr = "BinExpr"; export declare function isBinExpr(item: unknown): item is BinExpr; export interface CrudMap extends langium.AstNode { readonly $type: 'CrudMap' | 'QueryAllPattern'; attributes: Array; name: string; properties: Array; relationships: Array; } export declare const CrudMap = "CrudMap"; export declare function isCrudMap(item: unknown): item is CrudMap; export interface Delete extends langium.AstNode { readonly $container: Pattern; readonly $type: 'Delete'; pattern: Pattern; } export declare const Delete = "Delete"; export declare function isDelete(item: unknown): item is Delete; export interface Else extends langium.AstNode { readonly $container: If; readonly $type: 'Else'; statements: Array; } export declare const Else = "Else"; export declare function isElse(item: unknown): item is Else; export interface EntityDefinition extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'EntityDefinition'; extends?: ExtendsClause; name: string; schema: RecAttrs; } export declare const EntityDefinition = "EntityDefinition"; export declare function isEntityDefinition(item: unknown): item is EntityDefinition; export interface EventDefinition extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'EventDefinition'; extends?: ExtendsClause; name: string; schema: RecAttrs; } export declare const EventDefinition = "EventDefinition"; export declare function isEventDefinition(item: unknown): item is EventDefinition; export interface ExtendsClause extends langium.AstNode { readonly $container: EntityDefinition | EventDefinition | RecordDefinition; readonly $type: 'ExtendsClause'; parentName: string; } export declare const ExtendsClause = "ExtendsClause"; export declare function isExtendsClause(item: unknown): item is ExtendsClause; export interface FnCall extends langium.AstNode { readonly $container: AsyncFnCall | Literal; readonly $type: 'FnCall'; args: Array; name: Ref | string; } export declare const FnCall = "FnCall"; export declare function isFnCall(item: unknown): item is FnCall; export interface ForEach extends langium.AstNode { readonly $container: Pattern; readonly $type: 'ForEach'; src: Pattern; statements: Array; var: string; } export declare const ForEach = "ForEach"; export declare function isForEach(item: unknown): item is ForEach; export interface Group extends langium.AstNode { readonly $container: BinExpr | Group | If | NegExpr | NotExpr | SetAttribute; readonly $type: 'Group'; ge: Expr; } export declare const Group = "Group"; export declare function isGroup(item: unknown): item is Group; export interface If extends langium.AstNode { readonly $container: Pattern; readonly $type: 'If'; cond: Expr; else?: Else; statements: Array; } export declare const If = "If"; export declare function isIf(item: unknown): item is If; export interface Import extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'Import'; name: string; path: string; } export declare const Import = "Import"; export declare function isImport(item: unknown): item is Import; export interface KvPair extends langium.AstNode { readonly $container: KvPairs; readonly $type: 'KvPair'; key?: string; value: Literal; } export declare const KvPair = "KvPair"; export declare function isKvPair(item: unknown): item is KvPair; export interface KvPairs extends langium.AstNode { readonly $container: PropertyDefinition; readonly $type: 'KvPairs'; pairs: Array; } export declare const KvPairs = "KvPairs"; export declare function isKvPairs(item: unknown): item is KvPairs; export interface Literal extends langium.AstNode { readonly $container: BinExpr | FnCall | Group | If | KvPair | MapEntry | NegExpr | NotExpr | Pattern | SetAttribute; readonly $type: 'Literal'; array?: ArrayLiteral; asyncFnCall?: AsyncFnCall; bool?: Boolean; fnCall?: FnCall; id?: string; map?: MapLiteral; num?: Decimal; ref?: Ref; str?: string; } export declare const Literal = "Literal"; export declare function isLiteral(item: unknown): item is Literal; export interface MapEntry extends langium.AstNode { readonly $container: MapLiteral; readonly $type: 'MapEntry'; key: string; value: Literal; } export declare const MapEntry = "MapEntry"; export declare function isMapEntry(item: unknown): item is MapEntry; export interface MapLiteral extends langium.AstNode { readonly $container: Literal; readonly $type: 'MapLiteral'; entries: Array; } export declare const MapLiteral = "MapLiteral"; export declare function isMapLiteral(item: unknown): item is MapLiteral; export interface ModuleDefinition extends langium.AstNode { readonly $type: 'ModuleDefinition'; defs: Array; imports: Array; name: string; } export declare const ModuleDefinition = "ModuleDefinition"; export declare function isModuleDefinition(item: unknown): item is ModuleDefinition; export interface NegExpr extends langium.AstNode { readonly $container: BinExpr | Group | If | NegExpr | NotExpr | SetAttribute; readonly $type: 'NegExpr'; ne: Expr; } export declare const NegExpr = "NegExpr"; export declare function isNegExpr(item: unknown): item is NegExpr; export interface NodeDefinition extends langium.AstNode { readonly $container: RelNodes; readonly $type: 'NodeDefinition'; alias?: string; name: string; } export declare const NodeDefinition = "NodeDefinition"; export declare function isNodeDefinition(item: unknown): item is NodeDefinition; export interface NotExpr extends langium.AstNode { readonly $container: BinExpr | Group | If | NegExpr | NotExpr | SetAttribute; readonly $type: 'NotExpr'; ne: Expr; } export declare const NotExpr = "NotExpr"; export declare function isNotExpr(item: unknown): item is NotExpr; export interface OneOfSpec extends langium.AstNode { readonly $container: AttributeDefinition; readonly $type: 'OneOfSpec'; values: Array; } export declare const OneOfSpec = "OneOfSpec"; export declare function isOneOfSpec(item: unknown): item is OneOfSpec; export interface Pattern extends langium.AstNode { readonly $container: Delete | ForEach | Purge | RelationshipPattern | Statement; readonly $type: 'Pattern'; crudMap?: CrudMap; delete?: Delete; forEach?: ForEach; if?: If; literal?: Literal; purge?: Purge; upsert?: Upsert; } export declare const Pattern = "Pattern"; export declare function isPattern(item: unknown): item is Pattern; export interface PropertyDefinition extends langium.AstNode { readonly $container: AttributeDefinition | CrudMap | RelationshipDefinition; readonly $type: 'PropertyDefinition'; name: TaggedId; value?: KvPairs; } export declare const PropertyDefinition = "PropertyDefinition"; export declare function isPropertyDefinition(item: unknown): item is PropertyDefinition; export interface Purge extends langium.AstNode { readonly $container: Pattern; readonly $type: 'Purge'; pattern: Pattern; } export declare const Purge = "Purge"; export declare function isPurge(item: unknown): item is Purge; export interface RbacAllowSpec extends langium.AstNode { readonly $container: RbacSpecEntry; readonly $type: 'RbacAllowSpec'; oprs: Array; } export declare const RbacAllowSpec = "RbacAllowSpec"; export declare function isRbacAllowSpec(item: unknown): item is RbacAllowSpec; export interface RbacExpressionSpec extends langium.AstNode { readonly $container: RbacSpecEntry; readonly $type: 'RbacExpressionSpec'; lhs: Ref; rhs: Ref; } export declare const RbacExpressionSpec = "RbacExpressionSpec"; export declare function isRbacExpressionSpec(item: unknown): item is RbacExpressionSpec; export interface RbacOpr extends langium.AstNode { readonly $container: RbacAllowSpec; readonly $type: 'RbacOpr'; value: 'create' | 'delete' | 'read' | 'update'; } export declare const RbacOpr = "RbacOpr"; export declare function isRbacOpr(item: unknown): item is RbacOpr; export interface RbacRolesSpec extends langium.AstNode { readonly $container: RbacSpecEntry; readonly $type: 'RbacRolesSpec'; roles: Array; } export declare const RbacRolesSpec = "RbacRolesSpec"; export declare function isRbacRolesSpec(item: unknown): item is RbacRolesSpec; export interface RbacSpecDefinition extends langium.AstNode { readonly $container: RecAttrs; readonly $type: 'RbacSpecDefinition'; specEntries: Array; } export declare const RbacSpecDefinition = "RbacSpecDefinition"; export declare function isRbacSpecDefinition(item: unknown): item is RbacSpecDefinition; export interface RbacSpecEntries extends langium.AstNode { readonly $container: RbacSpecDefinition; readonly $type: 'RbacSpecEntries'; entries: Array; } export declare const RbacSpecEntries = "RbacSpecEntries"; export declare function isRbacSpecEntries(item: unknown): item is RbacSpecEntries; export interface RbacSpecEntry extends langium.AstNode { readonly $container: RbacSpecEntries; readonly $type: 'RbacSpecEntry'; allow?: RbacAllowSpec; expr?: RbacExpressionSpec; role?: RbacRolesSpec; } export declare const RbacSpecEntry = "RbacSpecEntry"; export declare function isRbacSpecEntry(item: unknown): item is RbacSpecEntry; export interface RecAttrs extends langium.AstNode { readonly $container: EntityDefinition | EventDefinition | RecordDefinition; readonly $type: 'RecAttrs'; attributes: Array; rbacSpec?: RbacSpecDefinition; } export declare const RecAttrs = "RecAttrs"; export declare function isRecAttrs(item: unknown): item is RecAttrs; export interface RecordDefinition extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'RecordDefinition'; extends?: ExtendsClause; name: string; schema: RecAttrs; } export declare const RecordDefinition = "RecordDefinition"; export declare function isRecordDefinition(item: unknown): item is RecordDefinition; export interface RelationshipDefinition extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'RelationshipDefinition'; attributes: Array; name: string; nodes: RelNodes; properties: Array; type: 'between' | 'contains'; } export declare const RelationshipDefinition = "RelationshipDefinition"; export declare function isRelationshipDefinition(item: unknown): item is RelationshipDefinition; export interface RelationshipPattern extends langium.AstNode { readonly $container: CrudMap | QueryAllPattern; readonly $type: 'RelationshipPattern'; name: string; pattern: Pattern; } export declare const RelationshipPattern = "RelationshipPattern"; export declare function isRelationshipPattern(item: unknown): item is RelationshipPattern; export interface RelNodes extends langium.AstNode { readonly $container: RelationshipDefinition; readonly $type: 'RelNodes'; node1: NodeDefinition; node2: NodeDefinition; } export declare const RelNodes = "RelNodes"; export declare function isRelNodes(item: unknown): item is RelNodes; export interface SetAttribute extends langium.AstNode { readonly $container: CrudMap; readonly $type: 'SetAttribute'; name: QueryId; op?: '<' | '<=' | '<>' | '=' | '>' | '>=' | 'between' | 'in' | 'like'; value: AttributeValueExpression; } export declare const SetAttribute = "SetAttribute"; export declare function isSetAttribute(item: unknown): item is SetAttribute; export interface StandaloneStatement extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'StandaloneStatement'; stmt: Statement; } export declare const StandaloneStatement = "StandaloneStatement"; export declare function isStandaloneStatement(item: unknown): item is StandaloneStatement; export interface Statement extends langium.AstNode { readonly $container: ArrayLiteral | Else | ForEach | If | StandaloneStatement | Throws | WorkflowDefinition; readonly $type: 'Statement'; alias?: string; aliases: Array; pattern: Pattern; throws?: Throws; } export declare const Statement = "Statement"; export declare function isStatement(item: unknown): item is Statement; export interface Throws extends langium.AstNode { readonly $container: Statement; readonly $type: 'Throws'; handlers: Array; } export declare const Throws = "Throws"; export declare function isThrows(item: unknown): item is Throws; export interface Upsert extends langium.AstNode { readonly $container: Pattern; readonly $type: 'Upsert'; pattern: CrudMap; } export declare const Upsert = "Upsert"; export declare function isUpsert(item: unknown): item is Upsert; export interface WorkflowDefinition extends langium.AstNode { readonly $container: ModuleDefinition; readonly $type: 'WorkflowDefinition'; name: string; statements: Array; } export declare const WorkflowDefinition = "WorkflowDefinition"; export declare function isWorkflowDefinition(item: unknown): item is WorkflowDefinition; export interface QueryAllPattern extends CrudMap { readonly $type: 'QueryAllPattern'; name: QueryId; relationships: Array; } export declare const QueryAllPattern = "QueryAllPattern"; export declare function isQueryAllPattern(item: unknown): item is QueryAllPattern; export type AgentlangAstType = { ArrayLiteral: ArrayLiteral; AsyncFnCall: AsyncFnCall; AttributeDefinition: AttributeDefinition; AttributeValueExpression: AttributeValueExpression; BinExpr: BinExpr; CrudMap: CrudMap; Definition: Definition; Delete: Delete; Else: Else; EntityDefinition: EntityDefinition; EventDefinition: EventDefinition; Expr: Expr; ExtendsClause: ExtendsClause; FnCall: FnCall; ForEach: ForEach; Group: Group; Handler: Handler; If: If; Import: Import; KvPair: KvPair; KvPairs: KvPairs; Literal: Literal; MapEntry: MapEntry; MapLiteral: MapLiteral; ModuleDefinition: ModuleDefinition; NegExpr: NegExpr; NodeDefinition: NodeDefinition; NotExpr: NotExpr; OneOfSpec: OneOfSpec; Pattern: Pattern; PrimExpr: PrimExpr; PropertyDefinition: PropertyDefinition; Purge: Purge; QueryAllPattern: QueryAllPattern; RbacAllowSpec: RbacAllowSpec; RbacExpressionSpec: RbacExpressionSpec; RbacOpr: RbacOpr; RbacRolesSpec: RbacRolesSpec; RbacSpecDefinition: RbacSpecDefinition; RbacSpecEntries: RbacSpecEntries; RbacSpecEntry: RbacSpecEntry; RecAttrs: RecAttrs; RecordDefinition: RecordDefinition; RelNodes: RelNodes; RelationshipDefinition: RelationshipDefinition; RelationshipPattern: RelationshipPattern; SchemaDef: SchemaDef; SetAttribute: SetAttribute; StandaloneStatement: StandaloneStatement; Statement: Statement; Throws: Throws; Upsert: Upsert; WorkflowDefinition: WorkflowDefinition; }; export declare class AgentlangAstReflection extends langium.AbstractAstReflection { getAllTypes(): string[]; protected computeIsSubtype(subtype: string, supertype: string): boolean; getReferenceType(refInfo: langium.ReferenceInfo): string; getTypeMetaData(type: string): langium.TypeMetaData; } export declare const reflection: AgentlangAstReflection; //# sourceMappingURL=ast.d.ts.map