Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  erl_syntax fails to revert imports

uffe
Posted: Tue Nov 28, 2006 5:58 pm Reply with quote
User Joined: 02 Mar 2005 Posts: 365 Location: Sweden
We discovered that erl_syntax doesn't handle packaged module names in
import clauses (actually, it handles it in -import(M), but not
-import(M,[...]).)

The following patch seems to do the trick.

BR,
Ulf W

uwiger$ diff erl_syntax.erl $R11B_2/lib/syntax_tools/src/erl_syntax.erl
2987,3003d2986
< Revert_list =
< fun(Mod) ->
< case is_list_skeleton(List) of
< true ->
< case is_proper_list(List) of
< true ->
< Fs = fold_function_names(
< list_elements(List)),
< {attribute, Pos, import,
< {Mod, Fs}};
< false ->
< Node
< end;
< false ->
< Node
< end
< end,
3006,3011c2989,3000
< Revert_list(concrete(A));
< qualified_name ->
< case revert_module_name(A) of
< {ok, Ar} ->
< Revert_list(Ar);
< error ->
---
> case is_list_skeleton(List) of
> true ->
> case is_proper_list(List) of
> true ->
> Fs = fold_function_names(
> list_elements(List)),
> {attribute, Pos, import,
> {concrete(A), Fs}};
> false ->
> Node
> end;
> false ->


_______________________________________________
erlang-bugs mailing list
erlang-bugs@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-bugs
Post recived from mailinglist
View user's profile Send private message Visit poster's website
Guest
Posted: Tue Nov 28, 2006 9:35 pm Reply with quote
Guest
Thanks for the report,

/Richard

Ulf Wiger wrote:
> We discovered that erl_syntax doesn't handle packaged module names in
> import clauses (actually, it handles it in -import(M), but not
> -import(M,[...]).)
>
> The following patch seems to do the trick.
>
> BR,
> Ulf W
>
> uwiger$ diff erl_syntax.erl $R11B_2/lib/syntax_tools/src/erl_syntax.erl
> 2987,3003d2986
> < Revert_list =
> < fun(Mod) ->
> < case is_list_skeleton(List) of
> < true ->
> < case is_proper_list(List) of
> < true ->
> < Fs = fold_function_names(
> < list_elements(List)),
> < {attribute, Pos, import,
> < {Mod, Fs}};
> < false ->
> < Node
> < end;
> < false ->
> < Node
> < end
> < end,
> 3006,3011c2989,3000
> < Revert_list(concrete(A));
> < qualified_name ->
> < case revert_module_name(A) of
> < {ok, Ar} ->
> < Revert_list(Ar);
> < error ->
> ---
>> case is_list_skeleton(List) of
>> true ->
>> case is_proper_list(List) of
>> true ->
>> Fs = fold_function_names(
>> list_elements(List)),
>> {attribute, Pos, import,
>> {concrete(A), Fs}};
>> false ->
>> Node
>> end;
>> false ->
>
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-bugs
>

_______________________________________________
erlang-bugs mailing list
erlang-bugs@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-bugs
Post recived from mailinglist

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum