aboutsummaryrefslogtreecommitdiffstats
path: root/erts/doc
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-01-31 20:09:44 +0100
committerAnthony Ramine <[email protected]>2014-01-31 20:28:18 +0100
commite5ccb57c0e45535d4b2b34cc85b177056b67b2da (patch)
tree20cde059aeb1460074f12f2472730f1e12ef564f /erts/doc
parenteec1d22c5aef21ad4606c79465084bbff46d42ee (diff)
downloadotp-e5ccb57c0e45535d4b2b34cc85b177056b67b2da.tar.gz
otp-e5ccb57c0e45535d4b2b34cc85b177056b67b2da.tar.bz2
otp-e5ccb57c0e45535d4b2b34cc85b177056b67b2da.zip
Document maps-related abstract syntax trees
{map,Loc,Fields} {map,Loc,Argument,Fields} {map_field_assoc,Loc,Name,Value} {map_field_exact,Loc,Name,Value}
Diffstat (limited to 'erts/doc')
-rw-r--r--erts/doc/src/absform.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/erts/doc/src/absform.xml b/erts/doc/src/absform.xml
index 4acc03b133..835a4fc692 100644
--- a/erts/doc/src/absform.xml
+++ b/erts/doc/src/absform.xml
@@ -217,6 +217,14 @@
Rep(E) = <c><![CDATA[{record_index,LINE,Name,Rep(Field)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0#Name.Field]]></c>, then
Rep(E) = <c><![CDATA[{record_field,LINE,Rep(E_0),Name,Rep(Field)}]]></c>.</item>
+ <item>If E is <c><![CDATA[#{W_1, ..., W_k}]]></c> where each
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,[Rep(W_1), ..., Rep(W_k)]}]]></c>. For Rep(W), see
+ below.</item>
+ <item>If E is <c><![CDATA[E_0#{W_1, ..., W_k}]]></c> where
+ <c><![CDATA[W_i]]></c> is a map assoc or exact field, then Rep(E) =
+ <c><![CDATA[{map,LINE,Rep(E_0),[Rep(W_1), ..., Rep(W_k)]}]]></c>. For
+ Rep(W), see below.</item>
<item>If E is <c><![CDATA[catch E_0]]></c>, then
Rep(E) = <c><![CDATA[{'catch',LINE,Rep(E_0)}]]></c>.</item>
<item>If E is <c><![CDATA[E_0(E_1, ..., E_k)]]></c>, then
@@ -334,6 +342,21 @@
is an integer, Rep(TS) = <c><![CDATA[{A, Value}]]></c>.</item>
</list>
</section>
+
+ <section>
+ <title>Map assoc and exact fields</title>
+ <p>When W is an assoc or exact field (in the body of a map), then:</p>
+ <list type="bulleted">
+ <item>If W is an assoc field <c><![CDATA[K => V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_assoc,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ <item>If W is an exact field <c><![CDATA[K := V]]></c>, where
+ <c><![CDATA[K]]></c> and <c><![CDATA[V]]></c> are both expressions,
+ then Rep(W) = <c><![CDATA[{map_field_exact,LINE,Rep(K),Rep(V)}]]></c>.
+ </item>
+ </list>
+ </section>
</section>
<section>