@zenstackhq/language
Advanced tools
Comparing version 1.6.2 to 1.7.0
@@ -9,4 +9,2 @@ /****************************************************************************** | ||
export declare function isAbstractDeclaration(item: unknown): item is AbstractDeclaration; | ||
export type AttributeName = DataModelAttributeName | DataModelFieldAttributeName | InternalAttributeName; | ||
export declare function isAttributeName(item: unknown): item is AttributeName; | ||
export type Boolean = boolean; | ||
@@ -19,6 +17,2 @@ export declare function isBoolean(item: unknown): item is Boolean; | ||
export declare function isConfigExpr(item: unknown): item is ConfigExpr; | ||
export type DataModelAttributeName = string; | ||
export declare function isDataModelAttributeName(item: unknown): item is DataModelAttributeName; | ||
export type DataModelFieldAttributeName = string; | ||
export declare function isDataModelFieldAttributeName(item: unknown): item is DataModelFieldAttributeName; | ||
export type Expression = ArrayExpr | BinaryExpr | InvocationExpr | LiteralExpr | MemberAccessExpr | NullExpr | ObjectExpr | ReferenceExpr | ThisExpr | UnaryExpr; | ||
@@ -29,9 +23,5 @@ export declare const Expression = "Expression"; | ||
export declare function isExpressionType(item: unknown): item is ExpressionType; | ||
export type InternalAttributeName = string; | ||
export declare function isInternalAttributeName(item: unknown): item is InternalAttributeName; | ||
export type LiteralExpr = BooleanLiteral | NumberLiteral | StringLiteral; | ||
export declare const LiteralExpr = "LiteralExpr"; | ||
export declare function isLiteralExpr(item: unknown): item is LiteralExpr; | ||
export type QualifiedName = string; | ||
export declare function isQualifiedName(item: unknown): item is QualifiedName; | ||
export type ReferenceTarget = DataModelField | EnumField | FunctionParam; | ||
@@ -64,3 +54,4 @@ export declare const ReferenceTarget = "ReferenceTarget"; | ||
attributes: Array<InternalAttribute>; | ||
name: AttributeName; | ||
comments: Array<string>; | ||
name: string; | ||
params: Array<AttributeParam>; | ||
@@ -81,2 +72,4 @@ } | ||
readonly $type: 'AttributeParam'; | ||
attributes: Array<InternalAttribute>; | ||
comments: Array<string>; | ||
default: boolean; | ||
@@ -268,3 +261,3 @@ name: RegularID; | ||
export interface InternalAttribute extends AstNode { | ||
readonly $container: Attribute | FunctionDecl; | ||
readonly $container: Attribute | AttributeParam | FunctionDecl; | ||
readonly $type: 'InternalAttribute'; | ||
@@ -309,3 +302,3 @@ args: Array<AttributeArg>; | ||
readonly $type: 'NullExpr'; | ||
value: string; | ||
value: 'null'; | ||
} | ||
@@ -370,3 +363,3 @@ export declare const NullExpr = "NullExpr"; | ||
readonly $type: 'ThisExpr'; | ||
value: string; | ||
value: 'this'; | ||
} | ||
@@ -373,0 +366,0 @@ export declare const ThisExpr = "ThisExpr"; |
@@ -7,5 +7,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DataModelField = exports.isDataModelAttribute = exports.DataModelAttribute = exports.isDataModel = exports.DataModel = exports.isConfigInvocationExpr = exports.ConfigInvocationExpr = exports.isConfigInvocationArg = exports.ConfigInvocationArg = exports.isConfigField = exports.ConfigField = exports.isConfigArrayExpr = exports.ConfigArrayExpr = exports.isBooleanLiteral = exports.BooleanLiteral = exports.isBinaryExpr = exports.BinaryExpr = exports.isAttributeParamType = exports.AttributeParamType = exports.isAttributeParam = exports.AttributeParam = exports.isAttributeArg = exports.AttributeArg = exports.isAttribute = exports.Attribute = exports.isArrayExpr = exports.ArrayExpr = exports.isArgument = exports.Argument = exports.isTypeDeclaration = exports.TypeDeclaration = exports.isRegularID = exports.isReferenceTarget = exports.ReferenceTarget = exports.isQualifiedName = exports.isLiteralExpr = exports.LiteralExpr = exports.isInternalAttributeName = exports.isExpressionType = exports.isExpression = exports.Expression = exports.isDataModelFieldAttributeName = exports.isDataModelAttributeName = exports.isConfigExpr = exports.ConfigExpr = exports.isBuiltinType = exports.isBoolean = exports.isAttributeName = exports.isAbstractDeclaration = exports.AbstractDeclaration = void 0; | ||
exports.UnaryExpr = exports.isThisExpr = exports.ThisExpr = exports.isStringLiteral = exports.StringLiteral = exports.isReferenceExpr = exports.ReferenceExpr = exports.isReferenceArg = exports.ReferenceArg = exports.isPluginField = exports.PluginField = exports.isPlugin = exports.Plugin = exports.isObjectExpr = exports.ObjectExpr = exports.isNumberLiteral = exports.NumberLiteral = exports.isNullExpr = exports.NullExpr = exports.isModelImport = exports.ModelImport = exports.isModel = exports.Model = exports.isMemberAccessExpr = exports.MemberAccessExpr = exports.isInvocationExpr = exports.InvocationExpr = exports.isInternalAttribute = exports.InternalAttribute = exports.isGeneratorDecl = exports.GeneratorDecl = exports.isFunctionParamType = exports.FunctionParamType = exports.isFunctionParam = exports.FunctionParam = exports.isFunctionDecl = exports.FunctionDecl = exports.isFieldInitializer = exports.FieldInitializer = exports.isEnumField = exports.EnumField = exports.isEnum = exports.Enum = exports.isDataSource = exports.DataSource = exports.isDataModelFieldType = exports.DataModelFieldType = exports.isDataModelFieldAttribute = exports.DataModelFieldAttribute = exports.isDataModelField = void 0; | ||
exports.reflection = exports.ZModelAstReflection = exports.isUnsupportedFieldType = exports.UnsupportedFieldType = exports.isUnaryExpr = void 0; | ||
exports.isDataModelFieldType = exports.DataModelFieldType = exports.isDataModelFieldAttribute = exports.DataModelFieldAttribute = exports.isDataModelField = exports.DataModelField = exports.isDataModelAttribute = exports.DataModelAttribute = exports.isDataModel = exports.DataModel = exports.isConfigInvocationExpr = exports.ConfigInvocationExpr = exports.isConfigInvocationArg = exports.ConfigInvocationArg = exports.isConfigField = exports.ConfigField = exports.isConfigArrayExpr = exports.ConfigArrayExpr = exports.isBooleanLiteral = exports.BooleanLiteral = exports.isBinaryExpr = exports.BinaryExpr = exports.isAttributeParamType = exports.AttributeParamType = exports.isAttributeParam = exports.AttributeParam = exports.isAttributeArg = exports.AttributeArg = exports.isAttribute = exports.Attribute = exports.isArrayExpr = exports.ArrayExpr = exports.isArgument = exports.Argument = exports.isTypeDeclaration = exports.TypeDeclaration = exports.isRegularID = exports.isReferenceTarget = exports.ReferenceTarget = exports.isLiteralExpr = exports.LiteralExpr = exports.isExpressionType = exports.isExpression = exports.Expression = exports.isConfigExpr = exports.ConfigExpr = exports.isBuiltinType = exports.isBoolean = exports.isAbstractDeclaration = exports.AbstractDeclaration = void 0; | ||
exports.reflection = exports.ZModelAstReflection = exports.isUnsupportedFieldType = exports.UnsupportedFieldType = exports.isUnaryExpr = exports.UnaryExpr = exports.isThisExpr = exports.ThisExpr = exports.isStringLiteral = exports.StringLiteral = exports.isReferenceExpr = exports.ReferenceExpr = exports.isReferenceArg = exports.ReferenceArg = exports.isPluginField = exports.PluginField = exports.isPlugin = exports.Plugin = exports.isObjectExpr = exports.ObjectExpr = exports.isNumberLiteral = exports.NumberLiteral = exports.isNullExpr = exports.NullExpr = exports.isModelImport = exports.ModelImport = exports.isModel = exports.Model = exports.isMemberAccessExpr = exports.MemberAccessExpr = exports.isInvocationExpr = exports.InvocationExpr = exports.isInternalAttribute = exports.InternalAttribute = exports.isGeneratorDecl = exports.GeneratorDecl = exports.isFunctionParamType = exports.FunctionParamType = exports.isFunctionParam = exports.FunctionParam = exports.isFunctionDecl = exports.FunctionDecl = exports.isFieldInitializer = exports.FieldInitializer = exports.isEnumField = exports.EnumField = exports.isEnum = exports.Enum = exports.isDataSource = exports.DataSource = void 0; | ||
/* eslint-disable */ | ||
@@ -18,6 +17,2 @@ const langium_1 = require("langium"); | ||
exports.isAbstractDeclaration = isAbstractDeclaration; | ||
function isAttributeName(item) { | ||
return isDataModelAttributeName(item) || isDataModelFieldAttributeName(item) || isInternalAttributeName(item); | ||
} | ||
exports.isAttributeName = isAttributeName; | ||
function isBoolean(item) { | ||
@@ -36,10 +31,2 @@ return typeof item === 'boolean'; | ||
exports.isConfigExpr = isConfigExpr; | ||
function isDataModelAttributeName(item) { | ||
return typeof item === 'string'; | ||
} | ||
exports.isDataModelAttributeName = isDataModelAttributeName; | ||
function isDataModelFieldAttributeName(item) { | ||
return typeof item === 'string'; | ||
} | ||
exports.isDataModelFieldAttributeName = isDataModelFieldAttributeName; | ||
exports.Expression = 'Expression'; | ||
@@ -54,6 +41,2 @@ function isExpression(item) { | ||
exports.isExpressionType = isExpressionType; | ||
function isInternalAttributeName(item) { | ||
return typeof item === 'string'; | ||
} | ||
exports.isInternalAttributeName = isInternalAttributeName; | ||
exports.LiteralExpr = 'LiteralExpr'; | ||
@@ -64,6 +47,2 @@ function isLiteralExpr(item) { | ||
exports.isLiteralExpr = isLiteralExpr; | ||
function isQualifiedName(item) { | ||
return typeof item === 'string'; | ||
} | ||
exports.isQualifiedName = isQualifiedName; | ||
exports.ReferenceTarget = 'ReferenceTarget'; | ||
@@ -382,2 +361,3 @@ function isReferenceTarget(item) { | ||
{ name: 'attributes', type: 'array' }, | ||
{ name: 'comments', type: 'array' }, | ||
{ name: 'params', type: 'array' } | ||
@@ -391,2 +371,4 @@ ] | ||
mandatory: [ | ||
{ name: 'attributes', type: 'array' }, | ||
{ name: 'comments', type: 'array' }, | ||
{ name: 'default', type: 'boolean' } | ||
@@ -393,0 +375,0 @@ ] |
{ | ||
"name": "@zenstackhq/language", | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"displayName": "ZenStack modeling language compiler", | ||
@@ -5,0 +5,0 @@ "description": "ZenStack modeling language compiler", |
@@ -13,3 +13,3 @@ { | ||
"name": "keyword.control.zmodel", | ||
"match": "\\b(Any|Asc|BigInt|Boolean|Bytes|ContextType|DateTime|Decimal|Desc|FieldReference|Float|Int|Json|Null|Object|String|TransitiveFieldReference|Unsupported|abstract|attribute|datasource|enum|extends|false|function|generator|import|in|model|plugin|sort|true|view)\\b" | ||
"match": "\\b(Any|Asc|BigInt|Boolean|Bytes|ContextType|DateTime|Decimal|Desc|FieldReference|Float|Int|Json|Null|Object|String|TransitiveFieldReference|Unsupported|abstract|attribute|datasource|enum|extends|false|function|generator|import|in|model|null|plugin|sort|this|true|view)\\b" | ||
}, | ||
@@ -16,0 +16,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167022
4812