diff options
author | Björn Gustavsson <[email protected]> | 2014-02-07 12:11:14 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-02-07 12:11:14 +0100 |
commit | d9283db0943ec94d737a28e31fdb63feb08a8e00 (patch) | |
tree | 8f178e8ce1a68850d7ced18d58306337c1ecb608 /lib/syntax_tools/src | |
parent | 75c490066bd84f531eea8fed118540a358042812 (diff) | |
parent | 52f88fc986a6ad4985cc0343ccc034ab3bd693fa (diff) | |
download | otp-d9283db0943ec94d737a28e31fdb63feb08a8e00.tar.gz otp-d9283db0943ec94d737a28e31fdb63feb08a8e00.tar.bz2 otp-d9283db0943ec94d737a28e31fdb63feb08a8e00.zip |
Merge branch 'nox/eep37/OTP-11537'
* nox/eep37/OTP-11537:
Support named funs in erl_prettypr
Diffstat (limited to 'lib/syntax_tools/src')
-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 4d6e88f58b..877675772f 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), |