From 42cf8b8ca9daec40a3595034a15f9f4be1cc854b Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Wed, 13 May 2015 15:56:11 +0200 Subject: Fix problem not recognizing 'macro' tuple from epp_dodger OTP-12740 --- lib/test_server/src/erl2html2.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/test_server/src') diff --git a/lib/test_server/src/erl2html2.erl b/lib/test_server/src/erl2html2.erl index acab8dfa52..b0b5c40965 100644 --- a/lib/test_server/src/erl2html2.erl +++ b/lib/test_server/src/erl2html2.erl @@ -170,7 +170,11 @@ get_line(Anno) -> %%% Find the line number of the last expression in the function find_clause_lines([{clause,CL,_Params,_Op,Exprs}], CLs) -> % last clause try tuple_to_list(lists:last(Exprs)) of - [_Type,ExprLine | _] -> + [_Type,ExprLine | _] when is_integer(ExprLine) -> + {lists:reverse([{clause,get_line(CL)}|CLs]), get_line(ExprLine)}; + [tree,_ | Exprs1] -> + find_clause_lines([{clause,CL,undefined,undefined,Exprs1}], CLs); + [macro,{_var,ExprLine,_MACRO} | _] when is_integer(ExprLine) -> {lists:reverse([{clause,get_line(CL)}|CLs]), get_line(ExprLine)}; _ -> {lists:reverse([{clause,get_line(CL)}|CLs]), get_line(CL)} -- cgit v1.2.3