use of org.eclipse.titan.designer.AST.TTCN3.values.expressions.ApplyExpression in project titan.EclipsePlug-ins by eclipse.
the class SpecificValue_Template method checkSpecificValue.
@Override
public /**
* {@inheritDoc}
*/
void checkSpecificValue(final CompilationTimeStamp timestamp, final boolean allowOmit) {
if (specificValue == null) {
return;
}
switch(specificValue.getValuetype()) {
case EXPRESSION_VALUE:
// checked later
break;
case OMIT_VALUE:
if (!allowOmit) {
getLocation().reportSemanticError(OmitValue_Template.SPECIFICVALUEEXPECTED);
}
return;
default:
return;
}
final Expression_Value expressionValue = (Expression_Value) specificValue;
if (!Operation_type.APPLY_OPERATION.equals(expressionValue.getOperationType())) {
return;
}
expressionValue.setLoweridToReference(timestamp);
IType type = ((ApplyExpression) expressionValue).getExpressionGovernor(timestamp, Expected_Value_type.EXPECTED_DYNAMIC_VALUE);
if (type == null) {
return;
}
type = type.getTypeRefdLast(timestamp);
if (Type_type.TYPE_FUNCTION.equals(type.getTypetype()) && ((Function_Type) type).returnsTemplate()) {
final ITTCN3Template template = setTemplatetype(timestamp, Template_type.TEMPLATE_INVOKE);
template.checkSpecificValue(timestamp, allowOmit);
}
}
Aggregations