use of org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.valuespecification.KeyValueValueSpecificationContext in project legend-pure by finos.
the class FunctionExpressionProcessor method addTraceForKeyExpressions.
private void addTraceForKeyExpressions(FunctionExpression functionExpression, ProcessorSupport processorSupport) {
ListIterable<? extends ValueSpecification> params = functionExpression._parametersValues().toList();
if (2 < params.size()) {
int z = 0;
for (CoreInstance keyValue : ImportStub.withImportStubByPasses(((InstanceValue) params.get(2))._valuesCoreInstance().toList(), processorSupport)) {
if (keyValue instanceof KeyExpression) {
KeyValueValueSpecificationContext usageContext = (KeyValueValueSpecificationContext) processorSupport.newAnonymousCoreInstance(null, M3Paths.KeyValueValueSpecificationContext);
usageContext._offset(z);
usageContext._functionExpression(functionExpression);
ValueSpecification expression = ((KeyExpression) keyValue)._expression();
if (null != expression._usageContext()) {
expression._usageContextRemove();
}
expression._usageContext(usageContext);
}
z++;
}
}
}
Aggregations