visitReferConstructCallExpr method

  1. @override
Uint8List visitReferConstructCallExpr(
  1. RedirectingConstructorCallExpr stmt
)
override

Implementation

@override
Uint8List visitReferConstructCallExpr(RedirectingConstructorCallExpr stmt) {
  final bytesBuilder = BytesBuilder();
  bytesBuilder.add(_parseIdentifier(stmt.callee.id));
  if (stmt.key != null) {
    bytesBuilder.addByte(1); // bool: has constructor name
    bytesBuilder.add(_parseIdentifier(stmt.key!.id));
  } else {
    bytesBuilder.addByte(0); // bool: has constructor name
  }
  final callArgs = _parseCallArguments(stmt.positionalArgs, stmt.namedArgs,
      hasLength: true);
  bytesBuilder.add(callArgs);
  return bytesBuilder.toBytes();
}