aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax_tools')
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 78a37445ed..93187fa018 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -5691,15 +5691,15 @@ fun_expr_arity(Node) ->
-spec named_fun_expr(syntaxTree(), [syntaxTree()]) -> syntaxTree().
named_fun_expr(Name, Clauses) ->
- tree(fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
+ tree(named_fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
revert_named_fun_expr(Node) ->
Pos = get_pos(Node),
Name = named_fun_expr_name(Node),
Clauses = [revert_clause(C) || C <- named_fun_expr_clauses(Node)],
case type(Name) of
- var ->
- {named_fun, Pos, concrete(Name), Clauses};
+ variable ->
+ {named_fun, Pos, variable_name(Name), Clauses};
_ ->
Node
end.
@@ -5715,7 +5715,7 @@ revert_named_fun_expr(Node) ->
named_fun_expr_name(Node) ->
case unwrap(Node) of
{named_fun, Pos, Name, _} ->
- set_pos(atom(Name), Pos);
+ set_pos(variable(Name), Pos);
Node1 ->
(data(Node1))#named_fun_expr.name
end.