Skip to content

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Sep 30, 2023
1 parent a7767c8 commit 85a4a8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/language/scoping/safe-ds-scope-computation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
isSdsTypeParameter,
isSdsTypeParameterList,
SdsClass,
SdsEnum, SdsEnumVariant,
SdsEnum,
SdsEnumVariant,
SdsTypeParameter,
} from '../generated/ast.js';

Expand All @@ -28,7 +29,7 @@ export class SafeDsScopeComputation extends DefaultScopeComputation {
this.processSdsEnum(node, document, scopes);
} else if (isSdsEnumVariant(node)) {
this.processSdsEnumVariant(node, document, scopes);
}else if (isSdsTypeParameter(node)) {
} else if (isSdsTypeParameter(node)) {
this.processSdsTypeParameter(node, document, scopes);
} else {
super.processNode(node, document, scopes);
Expand Down
13 changes: 8 additions & 5 deletions src/language/scoping/safe-ds-scope-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
isSdsBlock,
isSdsCallable,
isSdsClass,
isSdsEnum, isSdsEnumVariant,
isSdsEnum,
isSdsEnumVariant,
isSdsLambda,
isSdsMemberAccess,
isSdsMemberType,
Expand All @@ -33,7 +34,8 @@ import {
SdsPlaceholder,
SdsReference,
SdsStatement,
SdsType, SdsTypeArgument,
SdsType,
SdsTypeArgument,
SdsYield,
} from '../generated/ast.js';
import {
Expand All @@ -42,7 +44,8 @@ import {
enumVariantsOrEmpty,
parametersOrEmpty,
resultsOrEmpty,
statementsOrEmpty, typeParametersOrEmpty,
statementsOrEmpty,
typeParametersOrEmpty,
} from '../helpers/shortcuts.js';
import { isContainedIn } from '../helpers/ast.js';
import { isStatic } from '../helpers/checks.js';
Expand Down Expand Up @@ -303,10 +306,10 @@ export class SafeDsScopeProvider extends DefaultScopeProvider {

const namedTypeDeclaration = containingNamedType.declaration.ref;
if (isSdsClass(namedTypeDeclaration)) {
const typeParameters = typeParametersOrEmpty(namedTypeDeclaration.typeParameterList)
const typeParameters = typeParametersOrEmpty(namedTypeDeclaration.typeParameterList);
return this.createScopeForNodes(typeParameters);
} else if (isSdsEnumVariant(namedTypeDeclaration)) {
const typeParameters = typeParametersOrEmpty(namedTypeDeclaration.typeParameterList)
const typeParameters = typeParametersOrEmpty(namedTypeDeclaration.typeParameterList);
return this.createScopeForNodes(typeParameters);
} else {
return EMPTY_SCOPE;
Expand Down

0 comments on commit 85a4a8e

Please sign in to comment.