diff options
author | Anthony Ramine <[email protected]> | 2014-02-01 04:03:32 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-02-01 04:03:32 +0100 |
commit | 52f88fc986a6ad4985cc0343ccc034ab3bd693fa (patch) | |
tree | b8b2eb34e5ee1c5135b3a49b47723b791a4baf81 | |
parent | eec1d22c5aef21ad4606c79465084bbff46d42ee (diff) | |
download | otp-52f88fc986a6ad4985cc0343ccc034ab3bd693fa.tar.gz otp-52f88fc986a6ad4985cc0343ccc034ab3bd693fa.tar.bz2 otp-52f88fc986a6ad4985cc0343ccc034ab3bd693fa.zip |
Support named funs in erl_prettypr
-rw-r--r-- | lib/syntax_tools/src/erl_prettypr.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/syntax_tools/src/erl_prettypr.erl b/lib/syntax_tools/src/erl_prettypr.erl index 1ffcf31134..563fd36fdf 100644 --- a/lib/syntax_tools/src/erl_prettypr.erl +++ b/lib/syntax_tools/src/erl_prettypr.erl @@ -637,6 +637,14 @@ lay_2(Node, Ctxt) -> sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent), text("end")]); + named_fun_expr -> + Ctxt1 = reset_prec(Ctxt), + D1 = lay(erl_syntax:named_fun_expr_name(Node), Ctxt1), + D = lay_clauses(erl_syntax:named_fun_expr_clauses(Node), + {function,D1}, Ctxt1), + sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent), + text("end")]); + module_qualifier -> {PrecL, _Prec, PrecR} = inop_prec(':'), D1 = lay(erl_syntax:module_qualifier_argument(Node), |