aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzadean <[email protected]>2019-08-19 14:35:53 +0200
committerHans Bolinder <[email protected]>2019-08-22 13:59:28 +0200
commit98462d8ec91dc34a06f5a2801c906ca1a0dd4ba1 (patch)
tree739fce0ba6f41b91ad176c62b264df327f7d8cb9
parent204252d7dc8e2936f14ef48346317146a2f5f4af (diff)
downloadotp-98462d8ec91dc34a06f5a2801c906ca1a0dd4ba1.tar.gz
otp-98462d8ec91dc34a06f5a2801c906ca1a0dd4ba1.tar.bz2
otp-98462d8ec91dc34a06f5a2801c906ca1a0dd4ba1.zip
Also unwrap map_type_* name and value
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 385094d5bd..eeb9bc20ab 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -5311,11 +5311,11 @@ revert_map_type_assoc(Node) ->
-spec map_type_assoc_name(syntaxTree()) -> syntaxTree().
map_type_assoc_name(Node) ->
- case Node of
+ case unwrap(Node) of
{type, _, map_field_assoc, [Name, _]} ->
Name;
- _ ->
- (data(Node))#map_type_assoc.name
+ Node1 ->
+ (data(Node1))#map_type_assoc.name
end.
@@ -5327,11 +5327,11 @@ map_type_assoc_name(Node) ->
-spec map_type_assoc_value(syntaxTree()) -> syntaxTree().
map_type_assoc_value(Node) ->
- case Node of
+ case unwrap(Node) of
{type, _, map_field_assoc, [_, Value]} ->
Value;
- _ ->
- (data(Node))#map_type_assoc.value
+ Node1 ->
+ (data(Node1))#map_type_assoc.value
end.
@@ -5369,11 +5369,11 @@ revert_map_type_exact(Node) ->
-spec map_type_exact_name(syntaxTree()) -> syntaxTree().
map_type_exact_name(Node) ->
- case Node of
+ case unwrap(Node) of
{type, _, map_field_exact, [Name, _]} ->
Name;
- _ ->
- (data(Node))#map_type_exact.name
+ Node1 ->
+ (data(Node1))#map_type_exact.name
end.
@@ -5385,11 +5385,11 @@ map_type_exact_name(Node) ->
-spec map_type_exact_value(syntaxTree()) -> syntaxTree().
map_type_exact_value(Node) ->
- case Node of
+ case unwrap(Node) of
{type, _, map_field_exact, [_, Value]} ->
Value;
- _ ->
- (data(Node))#map_type_exact.value
+ Node1 ->
+ (data(Node1))#map_type_exact.value
end.