aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 76a6a6dc36..151f04b03b 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -5979,13 +5979,9 @@ is_literal(T) ->
revert(Node) ->
case is_tree(Node) of
false ->
- %% Just remove any wrapper and copy the position. `erl_parse'
- %% nodes never contain abstract syntax tree nodes as subtrees.
- case unwrap(Node) of
- {error, Info} -> {error, setelement(1,Info,get_pos(Node))};
- {warning, Info} -> {warning, setelement(1,Info,get_pos(Node))};
- Node1 -> setelement(2,Node1,get_pos(Node))
- end;
+ %% Just remove any wrapper. `erl_parse' nodes never contain
+ %% abstract syntax tree nodes as subtrees.
+ unwrap(Node);
true ->
case is_leaf(Node) of
true ->