final Token firstToken = node.getFirstToken();
if (UnaryOperator.isUnaryOperator(firstToken))
{
if (type instanceof ValueType)
{
final UnaryOperator unaryOp = UnaryOperator.createUnaryOperator(firstToken, _diagnosticFactory);
final Diagnostic diagnostic = unaryOp.validate((ValueType)type);
if (diagnostic.getSeverity() != Diagnostic.OK)
{
final int offset = _context.getDocumentPosition() + firstToken.beginColumn - 1;
final int length = node.getLastToken().endColumn - firstToken.beginColumn+1;
_reporter.report(diagnostic, offset, length);
}
((EvaluationTracker)data).
setType(unaryOp.performOperation ((ValueType)type));
}
// cannot apply operations to method bindings
else
{
final int offset = _context.getDocumentPosition() +