Thanks for writing this, it was a great read!<p>I maintain a source beautifier too [1], and it&#x27;s not as nice as I would like. One of the issues I run into is that the correct indent on a broken line is context dependent. For example:<p><pre><code>    while (someReallyReallyReallyReallyLongFunction() &amp;&amp;
           anotherLongFunction()) {
       loopBody();
    }
</code></pre>
is a nicer indenting than:<p><pre><code>    while (someReallyReallyReallyReallyLongFunction() &amp;&amp;
        anotherLongFunction()) {
        loopBody();
    }
</code></pre>
In the first case, the two conditions are aligned which makes the code clearer. Does dartfmt handle this? If not, do you have ideas on how it might?<p>Also, how does it handle invalid input? I may want to reindent my code before it&#x27;s correct.<p>Also, did you explore constraint solvers instead of a graph traversal? It seems like they would be a natural fit.<p>[1]: fish_indent, <a href="https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;blob&#x2F;master&#x2F;src&#x2F;fish_indent.cpp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;fish-shell&#x2F;fish-shell&#x2F;blob&#x2F;master&#x2F;src&#x2F;fis...</a>