Bad indentation in some cases of `try'
jimenezrick opened this issue · 2 comments
jimenezrick commented
The case try[...of]...catch
works perfectly. But try[...of]...catch...after
and try[...of]...after
don't work as expected:
try
foo
catch
_ ->
bar
after
fubar
end, <=== Indent wrong by -1
The next case is completely broken:
try
foo
after
bar
end,
jimenezrick commented
Very hard to fix with the current parser. When each line of code is examined to decide its indentation level, there is not easy way to differentiate between an end
after a receive
and another end
after a try
. Because the indentation level after an after
in a receive
is different from a try
.
jimenezrick commented
Fixed with the new indent code written in Erlang.