visitUnaryOperationAsync method
Implementation
@override
Future<dynamic> visitUnaryOperationAsync(UnaryOperation node) async {
final expr = await node.expression.acceptAsync(this);
switch (node.operator) {
case 'not':
case '!':
return !isTruthy(expr);
default:
throw UnsupportedError('Unsupported operator: ${node.operator}');
}
}