use of org.eclipse.titan.designer.AST.IType.Type_type in project titan.EclipsePlug-ins by eclipse.
the class DecvalueUnicharExpression method checkExpressionOperand3.
/**
* Checks the 3rd operand
* in charstring (optional)
* @param timestamp
* the timestamp of the actual semantic check cycle.
* @param expectedValue
* the kind of value expected.
* @param referenceChain
* a reference chain to detect cyclic references.
*/
private void checkExpressionOperand3(final CompilationTimeStamp timestamp, final Expected_Value_type expectedValue, final IReferenceChain referenceChain) {
if (value3 == null) {
return;
}
value3.setLoweridToReference(timestamp);
final Type_type tempType = value3.getExpressionReturntype(timestamp, expectedValue);
switch(tempType) {
case TYPE_CHARSTRING:
final IValue last = value3.getValueRefdLast(timestamp, expectedValue, referenceChain);
if (!last.isUnfoldable(timestamp)) {
final String originalString = ((Charstring_Value) last).getValue();
final CharstringExtractor cs = new CharstringExtractor(originalString);
if (cs.isErrorneous()) {
value3.getLocation().reportSemanticError(cs.getErrorMessage());
setIsErroneous(true);
}
}
break;
case TYPE_UNDEFINED:
setIsErroneous(true);
break;
default:
if (!isErroneous) {
location.reportSemanticError(OPERAND3_ERROR1);
setIsErroneous(true);
}
break;
}
}
use of org.eclipse.titan.designer.AST.IType.Type_type in project titan.EclipsePlug-ins by eclipse.
the class EncodeBase64Expression method checkExpressionOperands.
/**
* Checks the parameters of the expression and if they are valid in
* their position in the expression or not.
*
* @param timestamp
* the timestamp of the actual semantic check cycle.
* @param expectedValue
* the kind of value expected.
* @param referenceChain
* a reference chain to detect cyclic references.
*/
private void checkExpressionOperands(final CompilationTimeStamp timestamp, final Expected_Value_type expectedValue, final IReferenceChain referenceChain) {
if (value == null) {
return;
}
value.setLoweridToReference(timestamp);
final Type_type tempType = value.getExpressionReturntype(timestamp, expectedValue);
switch(tempType) {
case TYPE_OCTETSTRING:
// TODO: implement missing part if range check is needed
return;
case TYPE_UNDEFINED:
setIsErroneous(true);
return;
default:
if (!isErroneous) {
location.reportSemanticError(OPERANDERROR1);
setIsErroneous(true);
}
return;
}
}
use of org.eclipse.titan.designer.AST.IType.Type_type in project titan.EclipsePlug-ins by eclipse.
the class EncvalueUnicharExpression method checkExpressionOperand3.
/**
* Checks the 3rd operand
* in universal charstring (optional)
* @param timestamp
* the timestamp of the actual semantic check cycle.
* @param expectedValue
* the kind of value expected.
* @param referenceChain
* a reference chain to detect cyclic references.
*/
private void checkExpressionOperand3(final CompilationTimeStamp timestamp, final Expected_Value_type expectedValue, final IReferenceChain referenceChain) {
if (value3 == null) {
return;
}
value3.setLoweridToReference(timestamp);
final Type_type tempType = value3.getExpressionReturntype(timestamp, expectedValue);
switch(tempType) {
case TYPE_CHARSTRING:
case TYPE_UCHARSTRING:
break;
case TYPE_UNDEFINED:
setIsErroneous(true);
break;
default:
if (!isErroneous) {
location.reportSemanticError(OPERAND3_ERROR1);
setIsErroneous(true);
}
break;
}
}
use of org.eclipse.titan.designer.AST.IType.Type_type in project titan.EclipsePlug-ins by eclipse.
the class Float2StrExpression method checkExpressionOperands.
/**
* Checks the parameters of the expression and if they are valid in
* their position in the expression or not.
*
* @param timestamp
* the timestamp of the actual semantic check cycle.
* @param expectedValue
* the kind of value expected.
* @param referenceChain
* a reference chain to detect cyclic references.
*/
private void checkExpressionOperands(final CompilationTimeStamp timestamp, final Expected_Value_type expectedValue, final IReferenceChain referenceChain) {
if (value == null) {
return;
}
value.setLoweridToReference(timestamp);
final Type_type tempType = value.getExpressionReturntype(timestamp, expectedValue);
switch(tempType) {
case TYPE_REAL:
value.getValueRefdLast(timestamp, expectedValue, referenceChain);
return;
case TYPE_UNDEFINED:
setIsErroneous(true);
return;
default:
if (!isErroneous) {
location.reportSemanticError(OPERANDERROR);
setIsErroneous(true);
}
return;
}
}
use of org.eclipse.titan.designer.AST.IType.Type_type in project titan.EclipsePlug-ins by eclipse.
the class GetStringencodingExpression method checkExpressionOperands.
/**
* Checks the parameters of the expression and if they are valid in
* their position in the expression or not.
*
* @param timestamp
* the timestamp of the actual semantic check cycle.
* @param expectedValue
* the kind of value expected.
* @param referenceChain
* a reference chain to detect cyclic references.
*/
private void checkExpressionOperands(final CompilationTimeStamp timestamp, final Expected_Value_type expectedValue, final IReferenceChain referenceChain) {
if (value == null) {
return;
}
value.setLoweridToReference(timestamp);
final Type_type tempType = value.getExpressionReturntype(timestamp, expectedValue);
switch(tempType) {
case TYPE_OCTETSTRING:
// TODO: implement missing part if range check is needed
return;
case TYPE_UNDEFINED:
setIsErroneous(true);
return;
default:
if (!isErroneous) {
location.reportSemanticError(OPERANDERROR1);
setIsErroneous(true);
}
return;
}
}
Aggregations