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 Oct 17, 2023
1 parent 873822a commit 09c9865
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/language/partialEvaluation/toConstantExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import {
ConstantExpression,
ConstantFloat,
ConstantInt,
ConstantList, ConstantMap,
ConstantList,
ConstantMap,
ConstantNull,
ConstantString,
ParameterSubstitutions,
Expand All @@ -22,7 +23,8 @@ import {
isSdsIndexedAccess,
isSdsInfixOperation,
isSdsInt,
isSdsList, isSdsMap,
isSdsList,
isSdsMap,
isSdsMemberAccess,
isSdsNull,
isSdsParenthesizedExpression,
Expand Down
11 changes: 6 additions & 5 deletions src/language/validation/other/declarations/annotationCalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ import {
} from '../../../generated/ast.js';
import { getContainerOfType, ValidationAcceptor } from 'langium';
import {
annotationCallsOrEmpty, argumentsOrEmpty,
annotationCallsOrEmpty,
argumentsOrEmpty,
isRequiredParameter,
parametersOrEmpty,
resultsOrEmpty,
} from '../../../helpers/nodeProperties.js';
import { isEmpty } from 'radash';
import {toConstantExpression} from "../../../partialEvaluation/toConstantExpression.js";
import {UnknownValue} from "../../../partialEvaluation/model.js";
import { toConstantExpression } from '../../../partialEvaluation/toConstantExpression.js';
import { UnknownValue } from '../../../partialEvaluation/model.js';

export const CODE_ANNOTATION_CALL_CONSTANT_ARGUMENT = 'annotation-call/constant-argument';
export const CODE_ANNOTATION_CALL_MISSING_ARGUMENT_LIST = 'annotation-call/missing-argument-list';
Expand All @@ -28,14 +29,14 @@ export const annotationCallArgumentsMustBeConstant = (node: SdsAnnotationCall, a
const constantValue = toConstantExpression(argument.value);

if (constantValue === UnknownValue) {
accept('error', "Arguments of annotation calls must be constant.", {
accept('error', 'Arguments of annotation calls must be constant.', {
node: argument,
property: 'value',
code: CODE_ANNOTATION_CALL_CONSTANT_ARGUMENT,
});
}
}
}
};

export const annotationCallMustNotLackArgumentList = (node: SdsAnnotationCall, accept: ValidationAcceptor) => {
if (node.argumentList) {
Expand Down

0 comments on commit 09c9865

Please sign in to comment.