diff options
author | Hans Bolinder <[email protected]> | 2014-10-31 09:11:55 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-04-30 12:15:25 +0200 |
commit | da4deac551456d77378e7c5fcbb9b5b53ae7d4fc (patch) | |
tree | 9a9333f66cb4b429f0088aff7e169ec2c5ed24e5 /lib/test_server | |
parent | a3b8a7a6b93310e2d3327912253a14b8f20ad975 (diff) | |
download | otp-da4deac551456d77378e7c5fcbb9b5b53ae7d4fc.tar.gz otp-da4deac551456d77378e7c5fcbb9b5b53ae7d4fc.tar.bz2 otp-da4deac551456d77378e7c5fcbb9b5b53ae7d4fc.zip |
test_server: Use module erl_anno
Diffstat (limited to 'lib/test_server')
-rw-r--r-- | lib/test_server/src/erl2html2.erl | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/test_server/src/erl2html2.erl b/lib/test_server/src/erl2html2.erl index 7cfaa2c325..83e4dbc3eb 100644 --- a/lib/test_server/src/erl2html2.erl +++ b/lib/test_server/src/erl2html2.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 1997-2013. All Rights Reserved. +%% Copyright Ericsson AB 1997-2015. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -118,8 +118,9 @@ parse_preprocessed_file(Epp,File,InCorrectFile) -> {attribute,_,file,{_OtherFile,_}} -> parse_preprocessed_file(Epp,File,false); {function,L,F,A,[_|C]} when InCorrectFile -> - Clauses = [{clause,CL} || {clause,CL,_,_,_} <- C], - [{atom_to_list(F),A,L} | Clauses] ++ + Clauses = [{clause,get_line(CL)} || + {clause,CL,_,_,_} <- C], + [{atom_to_list(F),A,get_line(L)} | Clauses] ++ parse_preprocessed_file(Epp,File,true); _ -> parse_preprocessed_file(Epp,File,InCorrectFile) @@ -147,8 +148,9 @@ parse_non_preprocessed_file(Epp, File, Location) -> {ok,Tree,Location1} -> try erl_syntax:revert(Tree) of {function,L,F,A,[_|C]} -> - Clauses = [{clause,CL} || {clause,CL,_,_,_} <- C], - [{atom_to_list(F),A,L} | Clauses] ++ + Clauses = [{clause,get_line(CL)} || + {clause,CL,_,_,_} <- C], + [{atom_to_list(F),A,get_line(L)} | Clauses] ++ parse_non_preprocessed_file(Epp, File, Location1); _ -> parse_non_preprocessed_file(Epp, File, Location1) @@ -161,6 +163,9 @@ parse_non_preprocessed_file(Epp, File, Location) -> [] end. +get_line(Anno) -> + erl_anno:line(Anno). + %%%----------------------------------------------------------------- %%% Add a link target for each line and one for each function definition. build_html(SFd,DFd,Encoding,Functions) -> |