  Dedekind sums are arithmetic sums that were first introduced by Dedekind in
the context of elliptic functions and modular forms, and later recognized to be
surprisingly ubiquitous. Among the variations and generalizations introduced
since, there is a construction of Dedekind sums for lattices in
$\mathrm{SL}_2(\mathbf{R}). Building upon work of Asai, we prove the
reciprocity law for these Dedekind sums, based on a concrete realization of the
Euler class. As an application, we obtain an explicit formula expressing
Dedekind sums for Hecke triangle groups in terms of continued fractions.
