visitIsExpression method

  1. @override
Object? visitIsExpression(
  1. SIsExpression node
)
override

Visit a SIsExpression.

Implementation

@override
Object? visitIsExpression(SIsExpression node) {
  final value = node.expression!.accept<Object?>(this);
  // ghissues62: an awaited operand suspends; hand the suspension up so
  // the state machine resumes this node instead of using the request
  // as a value.
  if (value is AsyncSuspensionRequest) return value;
  final result = _valueHasType(node.type, value);
  return node.isNot ? !result : result;
}