@zenstackhq/language
Advanced tools
Comparing version 2.2.4 to 2.3.0
@@ -7,5 +7,55 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
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.isRegularIDWithTypeNames = 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 = exports.ZModelTerminals = void 0; | ||
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 = exports.isDataModelFieldType = exports.DataModelFieldType = void 0; | ||
exports.reflection = exports.ZModelAstReflection = void 0; | ||
exports.reflection = exports.ZModelAstReflection = exports.UnsupportedFieldType = exports.UnaryExpr = exports.ThisExpr = exports.StringLiteral = exports.ReferenceExpr = exports.ReferenceArg = exports.PluginField = exports.Plugin = exports.ObjectExpr = exports.NumberLiteral = exports.NullExpr = exports.ModelImport = exports.Model = exports.MemberAccessExpr = exports.InvocationExpr = exports.InternalAttribute = exports.GeneratorDecl = exports.FunctionParamType = exports.FunctionParam = exports.FunctionDecl = exports.FieldInitializer = exports.EnumField = exports.Enum = exports.DataSource = exports.DataModelFieldType = exports.DataModelFieldAttribute = exports.DataModelField = exports.DataModelAttribute = exports.DataModel = exports.ConfigInvocationExpr = exports.ConfigInvocationArg = exports.ConfigField = exports.ConfigArrayExpr = exports.BooleanLiteral = exports.BinaryExpr = exports.AttributeParamType = exports.AttributeParam = exports.AttributeArg = exports.Attribute = exports.ArrayExpr = exports.Argument = exports.TypeDeclaration = exports.ReferenceTarget = exports.LiteralExpr = exports.Expression = exports.ConfigExpr = exports.AbstractDeclaration = exports.ZModelTerminals = void 0; | ||
exports.isAbstractDeclaration = isAbstractDeclaration; | ||
exports.isBoolean = isBoolean; | ||
exports.isBuiltinType = isBuiltinType; | ||
exports.isConfigExpr = isConfigExpr; | ||
exports.isExpression = isExpression; | ||
exports.isExpressionType = isExpressionType; | ||
exports.isLiteralExpr = isLiteralExpr; | ||
exports.isReferenceTarget = isReferenceTarget; | ||
exports.isRegularID = isRegularID; | ||
exports.isRegularIDWithTypeNames = isRegularIDWithTypeNames; | ||
exports.isTypeDeclaration = isTypeDeclaration; | ||
exports.isArgument = isArgument; | ||
exports.isArrayExpr = isArrayExpr; | ||
exports.isAttribute = isAttribute; | ||
exports.isAttributeArg = isAttributeArg; | ||
exports.isAttributeParam = isAttributeParam; | ||
exports.isAttributeParamType = isAttributeParamType; | ||
exports.isBinaryExpr = isBinaryExpr; | ||
exports.isBooleanLiteral = isBooleanLiteral; | ||
exports.isConfigArrayExpr = isConfigArrayExpr; | ||
exports.isConfigField = isConfigField; | ||
exports.isConfigInvocationArg = isConfigInvocationArg; | ||
exports.isConfigInvocationExpr = isConfigInvocationExpr; | ||
exports.isDataModel = isDataModel; | ||
exports.isDataModelAttribute = isDataModelAttribute; | ||
exports.isDataModelField = isDataModelField; | ||
exports.isDataModelFieldAttribute = isDataModelFieldAttribute; | ||
exports.isDataModelFieldType = isDataModelFieldType; | ||
exports.isDataSource = isDataSource; | ||
exports.isEnum = isEnum; | ||
exports.isEnumField = isEnumField; | ||
exports.isFieldInitializer = isFieldInitializer; | ||
exports.isFunctionDecl = isFunctionDecl; | ||
exports.isFunctionParam = isFunctionParam; | ||
exports.isFunctionParamType = isFunctionParamType; | ||
exports.isGeneratorDecl = isGeneratorDecl; | ||
exports.isInternalAttribute = isInternalAttribute; | ||
exports.isInvocationExpr = isInvocationExpr; | ||
exports.isMemberAccessExpr = isMemberAccessExpr; | ||
exports.isModel = isModel; | ||
exports.isModelImport = isModelImport; | ||
exports.isNullExpr = isNullExpr; | ||
exports.isNumberLiteral = isNumberLiteral; | ||
exports.isObjectExpr = isObjectExpr; | ||
exports.isPlugin = isPlugin; | ||
exports.isPluginField = isPluginField; | ||
exports.isReferenceArg = isReferenceArg; | ||
exports.isReferenceExpr = isReferenceExpr; | ||
exports.isStringLiteral = isStringLiteral; | ||
exports.isThisExpr = isThisExpr; | ||
exports.isUnaryExpr = isUnaryExpr; | ||
exports.isUnsupportedFieldType = isUnsupportedFieldType; | ||
const langium_1 = require("langium"); | ||
@@ -28,11 +78,8 @@ exports.ZModelTerminals = { | ||
} | ||
exports.isAbstractDeclaration = isAbstractDeclaration; | ||
function isBoolean(item) { | ||
return typeof item === 'boolean'; | ||
} | ||
exports.isBoolean = isBoolean; | ||
function isBuiltinType(item) { | ||
return item === 'String' || item === 'Boolean' || item === 'Int' || item === 'BigInt' || item === 'Float' || item === 'Decimal' || item === 'DateTime' || item === 'Json' || item === 'Bytes'; | ||
} | ||
exports.isBuiltinType = isBuiltinType; | ||
exports.ConfigExpr = 'ConfigExpr'; | ||
@@ -42,3 +89,2 @@ function isConfigExpr(item) { | ||
} | ||
exports.isConfigExpr = isConfigExpr; | ||
exports.Expression = 'Expression'; | ||
@@ -48,7 +94,5 @@ function isExpression(item) { | ||
} | ||
exports.isExpression = isExpression; | ||
function isExpressionType(item) { | ||
return item === 'String' || item === 'Int' || item === 'Float' || item === 'Boolean' || item === 'DateTime' || item === 'Null' || item === 'Object' || item === 'Any' || item === 'Unsupported'; | ||
} | ||
exports.isExpressionType = isExpressionType; | ||
exports.LiteralExpr = 'LiteralExpr'; | ||
@@ -58,3 +102,2 @@ function isLiteralExpr(item) { | ||
} | ||
exports.isLiteralExpr = isLiteralExpr; | ||
exports.ReferenceTarget = 'ReferenceTarget'; | ||
@@ -64,11 +107,8 @@ function isReferenceTarget(item) { | ||
} | ||
exports.isReferenceTarget = isReferenceTarget; | ||
function isRegularID(item) { | ||
return item === 'model' || item === 'enum' || item === 'attribute' || item === 'datasource' || item === 'plugin' || item === 'abstract' || item === 'in' || item === 'view' || item === 'import' || (typeof item === 'string' && (/[_a-zA-Z][\w_]*/.test(item))); | ||
} | ||
exports.isRegularID = isRegularID; | ||
function isRegularIDWithTypeNames(item) { | ||
return isRegularID(item) || item === 'String' || item === 'Boolean' || item === 'Int' || item === 'BigInt' || item === 'Float' || item === 'Decimal' || item === 'DateTime' || item === 'Json' || item === 'Bytes' || item === 'Null' || item === 'Object' || item === 'Any' || item === 'Unsupported'; | ||
} | ||
exports.isRegularIDWithTypeNames = isRegularIDWithTypeNames; | ||
exports.TypeDeclaration = 'TypeDeclaration'; | ||
@@ -78,3 +118,2 @@ function isTypeDeclaration(item) { | ||
} | ||
exports.isTypeDeclaration = isTypeDeclaration; | ||
exports.Argument = 'Argument'; | ||
@@ -84,3 +123,2 @@ function isArgument(item) { | ||
} | ||
exports.isArgument = isArgument; | ||
exports.ArrayExpr = 'ArrayExpr'; | ||
@@ -90,3 +128,2 @@ function isArrayExpr(item) { | ||
} | ||
exports.isArrayExpr = isArrayExpr; | ||
exports.Attribute = 'Attribute'; | ||
@@ -96,3 +133,2 @@ function isAttribute(item) { | ||
} | ||
exports.isAttribute = isAttribute; | ||
exports.AttributeArg = 'AttributeArg'; | ||
@@ -102,3 +138,2 @@ function isAttributeArg(item) { | ||
} | ||
exports.isAttributeArg = isAttributeArg; | ||
exports.AttributeParam = 'AttributeParam'; | ||
@@ -108,3 +143,2 @@ function isAttributeParam(item) { | ||
} | ||
exports.isAttributeParam = isAttributeParam; | ||
exports.AttributeParamType = 'AttributeParamType'; | ||
@@ -114,3 +148,2 @@ function isAttributeParamType(item) { | ||
} | ||
exports.isAttributeParamType = isAttributeParamType; | ||
exports.BinaryExpr = 'BinaryExpr'; | ||
@@ -120,3 +153,2 @@ function isBinaryExpr(item) { | ||
} | ||
exports.isBinaryExpr = isBinaryExpr; | ||
exports.BooleanLiteral = 'BooleanLiteral'; | ||
@@ -126,3 +158,2 @@ function isBooleanLiteral(item) { | ||
} | ||
exports.isBooleanLiteral = isBooleanLiteral; | ||
exports.ConfigArrayExpr = 'ConfigArrayExpr'; | ||
@@ -132,3 +163,2 @@ function isConfigArrayExpr(item) { | ||
} | ||
exports.isConfigArrayExpr = isConfigArrayExpr; | ||
exports.ConfigField = 'ConfigField'; | ||
@@ -138,3 +168,2 @@ function isConfigField(item) { | ||
} | ||
exports.isConfigField = isConfigField; | ||
exports.ConfigInvocationArg = 'ConfigInvocationArg'; | ||
@@ -144,3 +173,2 @@ function isConfigInvocationArg(item) { | ||
} | ||
exports.isConfigInvocationArg = isConfigInvocationArg; | ||
exports.ConfigInvocationExpr = 'ConfigInvocationExpr'; | ||
@@ -150,3 +178,2 @@ function isConfigInvocationExpr(item) { | ||
} | ||
exports.isConfigInvocationExpr = isConfigInvocationExpr; | ||
exports.DataModel = 'DataModel'; | ||
@@ -156,3 +183,2 @@ function isDataModel(item) { | ||
} | ||
exports.isDataModel = isDataModel; | ||
exports.DataModelAttribute = 'DataModelAttribute'; | ||
@@ -162,3 +188,2 @@ function isDataModelAttribute(item) { | ||
} | ||
exports.isDataModelAttribute = isDataModelAttribute; | ||
exports.DataModelField = 'DataModelField'; | ||
@@ -168,3 +193,2 @@ function isDataModelField(item) { | ||
} | ||
exports.isDataModelField = isDataModelField; | ||
exports.DataModelFieldAttribute = 'DataModelFieldAttribute'; | ||
@@ -174,3 +198,2 @@ function isDataModelFieldAttribute(item) { | ||
} | ||
exports.isDataModelFieldAttribute = isDataModelFieldAttribute; | ||
exports.DataModelFieldType = 'DataModelFieldType'; | ||
@@ -180,3 +203,2 @@ function isDataModelFieldType(item) { | ||
} | ||
exports.isDataModelFieldType = isDataModelFieldType; | ||
exports.DataSource = 'DataSource'; | ||
@@ -186,3 +208,2 @@ function isDataSource(item) { | ||
} | ||
exports.isDataSource = isDataSource; | ||
exports.Enum = 'Enum'; | ||
@@ -192,3 +213,2 @@ function isEnum(item) { | ||
} | ||
exports.isEnum = isEnum; | ||
exports.EnumField = 'EnumField'; | ||
@@ -198,3 +218,2 @@ function isEnumField(item) { | ||
} | ||
exports.isEnumField = isEnumField; | ||
exports.FieldInitializer = 'FieldInitializer'; | ||
@@ -204,3 +223,2 @@ function isFieldInitializer(item) { | ||
} | ||
exports.isFieldInitializer = isFieldInitializer; | ||
exports.FunctionDecl = 'FunctionDecl'; | ||
@@ -210,3 +228,2 @@ function isFunctionDecl(item) { | ||
} | ||
exports.isFunctionDecl = isFunctionDecl; | ||
exports.FunctionParam = 'FunctionParam'; | ||
@@ -216,3 +233,2 @@ function isFunctionParam(item) { | ||
} | ||
exports.isFunctionParam = isFunctionParam; | ||
exports.FunctionParamType = 'FunctionParamType'; | ||
@@ -222,3 +238,2 @@ function isFunctionParamType(item) { | ||
} | ||
exports.isFunctionParamType = isFunctionParamType; | ||
exports.GeneratorDecl = 'GeneratorDecl'; | ||
@@ -228,3 +243,2 @@ function isGeneratorDecl(item) { | ||
} | ||
exports.isGeneratorDecl = isGeneratorDecl; | ||
exports.InternalAttribute = 'InternalAttribute'; | ||
@@ -234,3 +248,2 @@ function isInternalAttribute(item) { | ||
} | ||
exports.isInternalAttribute = isInternalAttribute; | ||
exports.InvocationExpr = 'InvocationExpr'; | ||
@@ -240,3 +253,2 @@ function isInvocationExpr(item) { | ||
} | ||
exports.isInvocationExpr = isInvocationExpr; | ||
exports.MemberAccessExpr = 'MemberAccessExpr'; | ||
@@ -246,3 +258,2 @@ function isMemberAccessExpr(item) { | ||
} | ||
exports.isMemberAccessExpr = isMemberAccessExpr; | ||
exports.Model = 'Model'; | ||
@@ -252,3 +263,2 @@ function isModel(item) { | ||
} | ||
exports.isModel = isModel; | ||
exports.ModelImport = 'ModelImport'; | ||
@@ -258,3 +268,2 @@ function isModelImport(item) { | ||
} | ||
exports.isModelImport = isModelImport; | ||
exports.NullExpr = 'NullExpr'; | ||
@@ -264,3 +273,2 @@ function isNullExpr(item) { | ||
} | ||
exports.isNullExpr = isNullExpr; | ||
exports.NumberLiteral = 'NumberLiteral'; | ||
@@ -270,3 +278,2 @@ function isNumberLiteral(item) { | ||
} | ||
exports.isNumberLiteral = isNumberLiteral; | ||
exports.ObjectExpr = 'ObjectExpr'; | ||
@@ -276,3 +283,2 @@ function isObjectExpr(item) { | ||
} | ||
exports.isObjectExpr = isObjectExpr; | ||
exports.Plugin = 'Plugin'; | ||
@@ -282,3 +288,2 @@ function isPlugin(item) { | ||
} | ||
exports.isPlugin = isPlugin; | ||
exports.PluginField = 'PluginField'; | ||
@@ -288,3 +293,2 @@ function isPluginField(item) { | ||
} | ||
exports.isPluginField = isPluginField; | ||
exports.ReferenceArg = 'ReferenceArg'; | ||
@@ -294,3 +298,2 @@ function isReferenceArg(item) { | ||
} | ||
exports.isReferenceArg = isReferenceArg; | ||
exports.ReferenceExpr = 'ReferenceExpr'; | ||
@@ -300,3 +303,2 @@ function isReferenceExpr(item) { | ||
} | ||
exports.isReferenceExpr = isReferenceExpr; | ||
exports.StringLiteral = 'StringLiteral'; | ||
@@ -306,3 +308,2 @@ function isStringLiteral(item) { | ||
} | ||
exports.isStringLiteral = isStringLiteral; | ||
exports.ThisExpr = 'ThisExpr'; | ||
@@ -312,3 +313,2 @@ function isThisExpr(item) { | ||
} | ||
exports.isThisExpr = isThisExpr; | ||
exports.UnaryExpr = 'UnaryExpr'; | ||
@@ -318,3 +318,2 @@ function isUnaryExpr(item) { | ||
} | ||
exports.isUnaryExpr = isUnaryExpr; | ||
exports.UnsupportedFieldType = 'UnsupportedFieldType'; | ||
@@ -324,3 +323,2 @@ function isUnsupportedFieldType(item) { | ||
} | ||
exports.isUnsupportedFieldType = isUnsupportedFieldType; | ||
class ZModelAstReflection extends langium_1.AbstractAstReflection { | ||
@@ -327,0 +325,0 @@ getAllTypes() { |
{ | ||
"name": "@zenstackhq/language", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"displayName": "ZenStack modeling language compiler", | ||
@@ -5,0 +5,0 @@ "description": "ZenStack modeling language compiler", |
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
169184
4891