aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src/igor.erl
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2013-11-29 12:02:34 +0100
committerHenrik Nord <[email protected]>2013-11-29 12:02:34 +0100
commit3fb3674b90d5d1591311e50fe8baea47e5674f5e (patch)
treebbdbab92a5c0f71c990f214c436377e1cd98fa40 /lib/syntax_tools/src/igor.erl
parent0b5ac8b3433ff05728d087b15666457ba27d1f32 (diff)
parent40d21f3f803a336b3d3edf338ec71a67ea1f09b1 (diff)
downloadotp-3fb3674b90d5d1591311e50fe8baea47e5674f5e.tar.gz
otp-3fb3674b90d5d1591311e50fe8baea47e5674f5e.tar.bz2
otp-3fb3674b90d5d1591311e50fe8baea47e5674f5e.zip
Merge branch 'maint'
Diffstat (limited to 'lib/syntax_tools/src/igor.erl')
-rw-r--r--lib/syntax_tools/src/igor.erl33
1 files changed, 19 insertions, 14 deletions
diff --git a/lib/syntax_tools/src/igor.erl b/lib/syntax_tools/src/igor.erl
index d385c2b690..19b1cd592f 100644
--- a/lib/syntax_tools/src/igor.erl
+++ b/lib/syntax_tools/src/igor.erl
@@ -1803,20 +1803,25 @@ transform_rule(T, Env, St) ->
transform_implicit_fun(T, Env, St) ->
{T1, St1} = default_transform(T, Env, St),
- F = erl_syntax_lib:analyze_implicit_fun(T1),
- {V, Text} = case (Env#code.map)(F) of
- F ->
- %% Not renamed
- {none, []};
- {Atom, Arity} ->
- %% Renamed
- N = rewrite(
- erl_syntax:implicit_fun_name(T1),
- erl_syntax:arity_qualifier(
- erl_syntax:atom(Atom),
- erl_syntax:integer(Arity))),
- T2 = erl_syntax:implicit_fun(N),
- {{value, T2}, ["function was renamed"]}
+ {V, Text} = case erl_syntax:type(erl_syntax:implicit_fun_name(T1)) of
+ arity_qualifier ->
+ F = erl_syntax_lib:analyze_implicit_fun(T1),
+ case (Env#code.map)(F) of
+ F ->
+ %% Not renamed
+ {none, []};
+ {Atom, Arity} ->
+ %% Renamed
+ N = rewrite(
+ erl_syntax:implicit_fun_name(T1),
+ erl_syntax:arity_qualifier(
+ erl_syntax:atom(Atom),
+ erl_syntax:integer(Arity))),
+ T2 = erl_syntax:implicit_fun(N),
+ {{value, T2}, ["function was renamed"]}
+ end;
+ module_qualifier ->
+ {none, []}
end,
{maybe_modified_quiet(V, T1, 2, Text, Env), St1}.