From 8432d74ba21a4ca627bead1a4607ded4a0c25d35 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Wed, 19 Mar 2014 11:20:32 +0100 Subject: Restore the alphabetical order of Core Erlang records The introduction of c_map{} and c_map_pair{} unnecessarily broke the alphabetical order of Core Erlang records. They were probably placed at the end of the file so as to use other records as types. There is really no need for this since 'cerl' contains appropriate definitions of types that can be used for this purpose. While at it, a type declaration to the c_binary{} definition was added. --- lib/compiler/src/core_parse.hrl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/compiler') diff --git a/lib/compiler/src/core_parse.hrl b/lib/compiler/src/core_parse.hrl index 20f3a46991..4a00535360 100644 --- a/lib/compiler/src/core_parse.hrl +++ b/lib/compiler/src/core_parse.hrl @@ -34,7 +34,7 @@ -record(c_apply, {anno=[], op, % op :: Tree, args}). % args :: [Tree] --record(c_binary, {anno=[], segments}). % segments :: [#c_bitstr{}] +-record(c_binary, {anno=[], segments :: [cerl:c_bitstr()]}). -record(c_bitstr, {anno=[], val, % val :: Tree, size, % size :: Tree, @@ -70,6 +70,15 @@ -record(c_literal, {anno=[], val}). % val :: literal() +-record(c_map, {anno=[], + arg=#c_literal{val=#{}} :: cerl:c_var() | cerl:c_literal(), + es :: [cerl:c_map_pair()]}). + +-record(c_map_pair, {anno=[], + op :: #c_literal{val::'assoc'} | #c_literal{val::'exact'}, + key, + val}). + -record(c_module, {anno=[], name, % name :: Tree, exports, % exports :: [Tree], attrs, % attrs :: [#c_def{}], @@ -96,12 +105,3 @@ -record(c_values, {anno=[], es}). % es :: [Tree] -record(c_var, {anno=[], name :: cerl:var_name()}). - --record(c_map_pair, {anno=[], - op :: #c_literal{val::'assoc'} | #c_literal{val::'exact'}, - key, - val}). - --record(c_map, {anno=[], - arg=#c_literal{val=#{}} :: #c_var{} | #c_literal{}, - es :: [#c_map_pair{}]}). -- cgit v1.2.3