Token currentToken = getToken();
if (currentToken != null) {
Type currentType = currentToken.getType();
TypeConstant current = new TypeConstant(currentType);
Inequality ineq = new Inequality(current, getTypeTerm());
result.add(ineq);
}
} catch (Exception e) {
// Ignored: expression cannot be evaluated at this time.
// do nothing.
}
// If the variable has a type, add a constraint.
// Type currentType = getType();
// if (currentType != BaseType.UNKNOWN) {
// TypeConstant current = new TypeConstant(currentType);
// Inequality ineq = new Inequality(current, getTypeTerm());
// result.add(ineq);
// }
// If an upper bound has been specified, add a constraint.
if (_typeAtMost != BaseType.UNKNOWN) {
TypeConstant atMost = new TypeConstant(_typeAtMost);
Inequality ineq = new Inequality(getTypeTerm(), atMost);
result.add(ineq);
}
return result;