aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2014-03-19 11:20:32 +0100
committerKostis Sagonas <[email protected]>2014-03-19 11:20:32 +0100
commit8432d74ba21a4ca627bead1a4607ded4a0c25d35 (patch)
tree91a4bd7636c10a7f83983567661feac519f6bf68 /lib/compiler/src
parent8b23a059c7c0e23c08b76871ba502f8e9db08c84 (diff)
downloadotp-8432d74ba21a4ca627bead1a4607ded4a0c25d35.tar.gz
otp-8432d74ba21a4ca627bead1a4607ded4a0c25d35.tar.bz2
otp-8432d74ba21a4ca627bead1a4607ded4a0c25d35.zip
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.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/core_parse.hrl20
1 files changed, 10 insertions, 10 deletions
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{}]}).