From 5a7029ac5afc2a6a55241a2e01d0174741ab4a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 20 Apr 2016 05:20:25 +0200 Subject: core_parse: Don't sort map patterns If we pretty print to a file and read it back in, we expect to get the same cerl data structures back. --- lib/compiler/src/core_parse.yrl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/compiler') diff --git a/lib/compiler/src/core_parse.yrl b/lib/compiler/src/core_parse.yrl index e01f826eef..8028aa99bb 100644 --- a/lib/compiler/src/core_parse.yrl +++ b/lib/compiler/src/core_parse.yrl @@ -196,9 +196,9 @@ tuple_pattern -> '{' anno_patterns '}' : c_tuple('$2'). map_pattern -> '~' '{' '}' '~' : c_map_pattern([]). map_pattern -> '~' '{' map_pair_patterns '}' '~' : - c_map_pattern(lists:sort('$3')). + c_map_pattern('$3'). map_pattern -> '~' '{' map_pair_patterns '|' anno_map_expr '}' '~' : - ann_c_map_pattern('$5', lists:sort('$3')). + ann_c_map_pattern('$5', '$3'). map_pair_patterns -> map_pair_pattern : ['$1']. map_pair_patterns -> map_pair_pattern ',' map_pair_patterns : ['$1' | '$3']. -- cgit v1.2.3