Skip to content

Commit

Permalink
. Version 0.2.1
Browse files Browse the repository at this point in the history
. Bugfix in the module clone_module.


git-svn-id: http://translib.googlecode.com/svn/trunk@12 e7705c4e-9092-11dd-9c26-113ed4d91f68
  • Loading branch information
christopher.faulet@gmail.com committed Oct 7, 2009
1 parent 5bb2fee commit 390f504
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -1,3 +1,14 @@
2009-09-29 Christopher Faulet <christopher.faulet@capflam.com>

* Version 0.2.1

* src/clone_module.erl: Bugfix in the anonymous function that
parses the source module. all "unknown" attributes are appended
into the list attribute_forms exept "spec" attributes that are
appended into the list other_forms. When the abstract tree is
rebuilt, the functions list is sorted in same time that the list
other_forms.

2009-08-12 Christopher Faulet <c.faulet@meetic-corp.com>

* Version 0.2.0
Expand Down
6 changes: 3 additions & 3 deletions configure.ac
Expand Up @@ -4,7 +4,7 @@ dnl ------------------------------------------------------------------
dnl Autoconf initialisation.
dnl ------------------------------------------------------------------

AC_INIT([translib], [0.2.0], [christopher.faulet@capflam.org], [translib])
AC_INIT([translib], [0.2.1], [christopher.faulet@capflam.org], [translib])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([ac-aux])

Expand Down Expand Up @@ -165,10 +165,10 @@ AC_ERLANG_CHECK_LIB([eunit], [], [AC_MSG_WARN([eunit was not found!])])


dnl Determine directories for installation.
if test "x${prefix}" = "xNONE"; then
if test "x${prefix}" = "xNONE" -a "x${ERLANG_INSTALL_LIB_DIR}" = "x"; then
# Inside Erlang lib dir
ERLANG_INSTALL_LIB_DIR="${ERLANG_LIB_DIR}"
else
elif test "x${prefix}" != "xNONE"; then
# Under $prefix
ERLANG_INSTALL_LIB_DIR="${prefix}/lib"
fi
Expand Down
10 changes: 9 additions & 1 deletion src/clone_module.erl
Expand Up @@ -253,6 +253,14 @@ parse({attribute, _Line, clone, {Mod, Args}}=Form,
({eof, _}, S) -> S; %% ignore it
({attribute, _, export, L}, S) ->
S#clone_infos{exports=L++S#clone_infos.exports};
({attribute, _, spec, _}=Spec, S) ->
S#clone_infos{
other_forms=[Spec|S#clone_infos.other_forms]
};
({attribute, _, _, _}=A, S) ->
S#clone_infos{
attribute_forms=[A|S#clone_infos.attribute_forms]
};
({function, L, N, A, C}, S) ->
%% Parse clauses
{NewC, _} = parse(C, S),
Expand Down Expand Up @@ -308,7 +316,7 @@ parse({eof, Line}, State) ->
OtherForms = State#clone_infos.other_forms,

Forms = lists:keysort(2, Attributes) ++ [Exports] ++
lists:keysort(2, FunForms) ++ lists:keysort(2, OtherForms),
lists:keysort(2, FunForms ++ OtherForms),
{Forms, {eof, Line}, [], State};


Expand Down

0 comments on commit 390f504

Please sign in to comment.