aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src/erl_prettypr.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2019-06-26 11:01:33 +0200
committerHans Bolinder <[email protected]>2019-06-27 09:20:06 +0200
commit74f7e6e38b21c94595f5e45dad1ba364ed11f11a (patch)
treeb3013ff8da4de82b18ebd7d3035484bcc96d1e0a /lib/syntax_tools/src/erl_prettypr.erl
parent14944c65bada76cf246f885f7a146c7fd54cb3df (diff)
downloadotp-74f7e6e38b21c94595f5e45dad1ba364ed11f11a.tar.gz
otp-74f7e6e38b21c94595f5e45dad1ba364ed11f11a.tar.bz2
otp-74f7e6e38b21c94595f5e45dad1ba364ed11f11a.zip
Remove 'cond'-expressions from syntax_tools
'cond' expressions were an experimental addition to the Erlang language that never matured to the point that it could be incorporated to it. This pull request takes out the (incomplete anyway) handling of 'cond' expressions from the syntax_tools application, so as to simplify its code base.
Diffstat (limited to 'lib/syntax_tools/src/erl_prettypr.erl')
-rw-r--r--lib/syntax_tools/src/erl_prettypr.erl12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/syntax_tools/src/erl_prettypr.erl b/lib/syntax_tools/src/erl_prettypr.erl
index 6ad9bec2e6..d70dd40a8a 100644
--- a/lib/syntax_tools/src/erl_prettypr.erl
+++ b/lib/syntax_tools/src/erl_prettypr.erl
@@ -53,7 +53,7 @@
-type hook() :: 'none'
| fun((erl_syntax:syntaxTree(), _, _) -> prettypr:document()).
--type clause_t() :: 'case_expr' | 'cond_expr' | 'fun_expr'
+-type clause_t() :: 'case_expr' | 'fun_expr'
| 'if_expr' | 'receive_expr' | 'try_expr'
| {'function', prettypr:document()}
| 'spec'.
@@ -586,8 +586,6 @@ lay_2(Node, Ctxt) ->
make_fun_clause(N, D1, D2, D3, Ctxt);
if_expr ->
make_if_clause(D1, D2, D3, Ctxt);
- cond_expr ->
- make_if_clause(D1, D2, D3, Ctxt);
case_expr ->
make_case_clause(D1, D2, D3, Ctxt);
receive_expr ->
@@ -627,14 +625,6 @@ lay_2(Node, Ctxt) ->
sep([follow(text("if"), D, Ctxt1#ctxt.sub_indent),
text("end")]);
- cond_expr ->
- Ctxt1 = reset_prec(Ctxt),
- D = lay_clauses(erl_syntax:cond_expr_clauses(Node),
- cond_expr, Ctxt1),
- sep([text("cond"),
- nest(Ctxt1#ctxt.sub_indent, D),
- text("end")]);
-
fun_expr ->
Ctxt1 = reset_prec(Ctxt),
D = lay_clauses(erl_syntax:fun_expr_clauses(Node),