The evaporation of sessile drops in quiescent air is usually governed by vapour diffusion. For contact angles below $90^\circ$, the evaporative flux from the droplet tends to diverge in the vicinity of the contact line. Therefore, the description of the flow inside an evaporating drop has remained a challenge. Here, we focus on the asymptotic behaviour near the pinned contact line, by analytically solving the Stokes equations in a wedge geometry of arbitrary contact angle. The flow field is described by similarity solutions, with exponents that match the singular boundary condition due to evaporation. We demonstrate that there are three contributions to the flow in a wedge: the evaporative flux, the downward motion of the liquid-air interface and the eigenmode solution which fulfils the homogeneous boundary conditions. Below a critical contact angle of $133.4^\circ$, the evaporative flux solution will dominate, while above this angle the eigenmode solution dominates. We demonstrate that for small contact angles, the velocity field is very accurately described by the lubrication approximation. For larger contact angles, the flow separates into regions where the flow is reversing towards the drop centre.