From ac264cba1435bf84eecc6b31809bd996c4c8e9c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 23 Oct 2014 19:49:12 +0200 Subject: syntax_tools: Teach Maps to erl_syntax Affected functions: * erl_syntax:abstract/1 * erl_syntax:concrete/1 * erl_syntax:is_leaf/1 * erl_syntax:is_literal/1 --- lib/syntax_tools/test/syntax_tools_SUITE.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/syntax_tools/test') diff --git a/lib/syntax_tools/test/syntax_tools_SUITE.erl b/lib/syntax_tools/test/syntax_tools_SUITE.erl index b4141956e6..721d1fd87c 100644 --- a/lib/syntax_tools/test/syntax_tools_SUITE.erl +++ b/lib/syntax_tools/test/syntax_tools_SUITE.erl @@ -136,6 +136,8 @@ t_abstract_type(Config) when is_list(Config) -> {[$a,$b,$c],string}, {"hello world",string}, {<<1,2,3>>,binary}, + {#{a=>1,"b"=>2},map_expr}, + {#{#{i=>1}=>1,"b"=>#{v=>2}},map_expr}, {{a,b,c},tuple}]), ok. @@ -152,6 +154,7 @@ t_erl_parse_type(Config) when is_list(Config) -> {"_", underscore,true}, {"[]", nil,true}, {"{}", tuple,true}, + {"#{}",map_expr,true}, {"'some atom'", atom, true}]), %% composite types ok = validate(F,[{"case X of t -> t; f -> f end", case_expr,false}, @@ -175,6 +178,7 @@ t_erl_parse_type(Config) when is_list(Config) -> {"[<<1>>,<<2>>,-2,<<>>,[more,list]]", list,false}, {"[1|[2|[3|[4|[]]]]]", list,false}, {"#{ a=>1, b=>2 }", map_expr,false}, + {"#{3=>3}#{ a=>1, b=>2 }", map_expr,false}, {"#{ a:=1, b:=2 }", map_expr,false}, {"M#{ a=>1, b=>2 }", map_expr,false}, {"[V||V <- Vs]", list_comp,false}, -- cgit v1.2.3