diff options
author | Peter Andersson <[email protected]> | 2015-05-13 15:56:11 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2015-05-13 15:56:11 +0200 |
commit | 42cf8b8ca9daec40a3595034a15f9f4be1cc854b (patch) | |
tree | 1cb00ba4eed2b2ff033fc03d32204af3fcdb0e69 /lib/test_server/src | |
parent | 6477f1ddad8cb2e8eb8336cda15fbb14d7fa8e93 (diff) | |
download | otp-42cf8b8ca9daec40a3595034a15f9f4be1cc854b.tar.gz otp-42cf8b8ca9daec40a3595034a15f9f4be1cc854b.tar.bz2 otp-42cf8b8ca9daec40a3595034a15f9f4be1cc854b.zip |
Fix problem not recognizing 'macro' tuple from epp_dodger
OTP-12740
Diffstat (limited to 'lib/test_server/src')
-rw-r--r-- | lib/test_server/src/erl2html2.erl | 6 |
1 files changed, 5 insertions, 1 deletions
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)} |