Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

langium

Package Overview
Dependencies
Maintainers
4
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langium - npm Package Compare versions

Comparing version 3.1.0-next.c8e01a2 to 3.1.0-next.cbc5db3

4

lib/grammar/type-system/type-collector/inferred-types.js

@@ -187,3 +187,3 @@ /******************************************************************************

actionWithAssignment: value.actionWithAssignment,
ruleCalls: [...value.ruleCalls],
ruleCalls: value.ruleCalls.slice(),
properties: value.properties.map(copyProperty),

@@ -196,3 +196,3 @@ };

super: value.super,
ruleCalls: value.ruleCalls,
ruleCalls: value.ruleCalls.slice(),
properties: value.properties.map(e => copyProperty(e))

@@ -199,0 +199,0 @@ };

@@ -37,4 +37,4 @@ /******************************************************************************

export declare function findAstTypes(type: PropertyType): string[];
export declare function findAstTypesInternal(type: PropertyType, visited: Set<PropertyType>): string[];
export declare function isAstType(type: PropertyType): boolean;
export declare function isAstTypeInternal(type: PropertyType, visited: Set<PropertyType>): boolean;
//# sourceMappingURL=types-util.d.ts.map

@@ -193,3 +193,3 @@ /******************************************************************************

}
export function findAstTypesInternal(type, visited) {
function findAstTypesInternal(type, visited) {
if (visited.has(type)) {

@@ -219,4 +219,13 @@ return [];

export function isAstType(type) {
return isAstTypeInternal(type, new Set());
}
export function isAstTypeInternal(type, visited) {
if (visited.has(type)) {
return false;
}
else {
visited.add(type);
}
if (isPropertyUnion(type)) {
return type.types.every(isAstType);
return type.types.every(e => isAstTypeInternal(e, visited));
}

@@ -226,3 +235,3 @@ else if (isValueType(type)) {

if ('type' in value) {
return isAstType(value.type);
return isAstTypeInternal(value.type, visited);
}

@@ -229,0 +238,0 @@ else {

{
"name": "langium",
"version": "3.1.0-next.c8e01a2",
"version": "3.1.0-next.cbc5db3",
"description": "A language engineering tool for the Language Server Protocol",

@@ -73,3 +73,3 @@ "homepage": "https://langium.org",

"devDependencies": {
"langium-cli": "3.1.0-next.c8e01a2"
"langium-cli": "3.1.0-next.cbc5db3"
},

@@ -76,0 +76,0 @@ "volta": {

@@ -230,3 +230,3 @@ /******************************************************************************

actionWithAssignment: value.actionWithAssignment,
ruleCalls: [...value.ruleCalls],
ruleCalls: value.ruleCalls.slice(),
properties: value.properties.map(copyProperty),

@@ -240,3 +240,3 @@ };

super: value.super,
ruleCalls: value.ruleCalls,
ruleCalls: value.ruleCalls.slice(),
properties: value.properties.map(e => copyProperty(e))

@@ -243,0 +243,0 @@ };

@@ -212,3 +212,3 @@ /******************************************************************************

export function findAstTypesInternal(type: PropertyType, visited: Set<PropertyType>): string[] {
function findAstTypesInternal(type: PropertyType, visited: Set<PropertyType>): string[] {
if (visited.has(type)) {

@@ -235,8 +235,17 @@ return [];

export function isAstType(type: PropertyType): boolean {
return isAstTypeInternal(type, new Set());
}
export function isAstTypeInternal(type: PropertyType, visited: Set<PropertyType>): boolean {
if (visited.has(type)) {
return false;
} else {
visited.add(type);
}
if (isPropertyUnion(type)) {
return type.types.every(isAstType);
return type.types.every(e => isAstTypeInternal(e, visited));
} else if (isValueType(type)) {
const value = type.value;
if ('type' in value) {
return isAstType(value.type);
return isAstTypeInternal(value.type, visited);
} else {

@@ -243,0 +252,0 @@ // Is definitely an interface type

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc