dwango / fialyzer

[WIP] Faster Implementation of Dialyzer
https://dwango.github.io/fialyzer/
Apache License 2.0
56 stars 8 forks source link

Support try expression #254

Closed yoshihiro503 closed 5 years ago

yoshihiro503 commented 5 years ago

Fix https://github.com/dwango/fialyzer/issues/223 This is a simple implementation of try expression and does not support catch clauses.

For the full support of try expression, implements about catch clauses : https://github.com/dwango/fialyzer/issues/252.

simple try expressions

    try
        <exprs>
    catch
        <catch-clauses>
    end.

[<exprs>]

try expressions with pattern clauses (with an of section)

    try
        <exprs>
    of
        <case-clauses>
    catch
        <catch-clauses>
    end.

Case(line, [<exprs>], [<case-clauses>])

try expressions with an after section

    try
        <exprs>
    catch
        <catch-clauses>
    after
        <after>
    end.

Let(line, "_", [<exprs>], [<after>])