diff options
author | Richard Carlsson <[email protected]> | 2014-04-21 10:40:12 +0200 |
---|---|---|
committer | Richard Carlsson <[email protected]> | 2014-12-22 11:50:35 +0100 |
commit | 7bafc1b2ddd34b5905b9ef7d88dee5d8fc9c6aab (patch) | |
tree | 6b709480793c02f79745c1609499d9c842143841 /lib/syntax_tools/src/erl_syntax_lib.erl | |
parent | d306a3a99907adbdd5419090df2781c2773acf1b (diff) | |
download | otp-7bafc1b2ddd34b5905b9ef7d88dee5d8fc9c6aab.tar.gz otp-7bafc1b2ddd34b5905b9ef7d88dee5d8fc9c6aab.tar.bz2 otp-7bafc1b2ddd34b5905b9ef7d88dee5d8fc9c6aab.zip |
Remove support for mnemosyne-style record field access
(The support in erl_parse got removed when 'packages' were removed, since
the dot notation was overlaid on the existing mnemosyne access syntax.)
Diffstat (limited to 'lib/syntax_tools/src/erl_syntax_lib.erl')
-rw-r--r-- | lib/syntax_tools/src/erl_syntax_lib.erl | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/lib/syntax_tools/src/erl_syntax_lib.erl b/lib/syntax_tools/src/erl_syntax_lib.erl index 2f0488abec..d5f80e15f4 100644 --- a/lib/syntax_tools/src/erl_syntax_lib.erl +++ b/lib/syntax_tools/src/erl_syntax_lib.erl @@ -1669,7 +1669,7 @@ analyze_record_attribute_tuple(Node) -> %% <dt>`record_expr':</dt> %% <dd>`{atom(), [{atom(), Value}]}'</dd> %% <dt>`record_access':</dt> -%% <dd>`{atom(), atom()} | atom()'</dd> +%% <dd>`{atom(), atom()}'</dd> %% <dt>`record_index_expr':</dt> %% <dd>`{atom(), atom()}'</dd> %% </dl> @@ -1679,9 +1679,7 @@ analyze_record_attribute_tuple(Node) -> %% listed in the order they appear. (See %% `analyze_record_field/1' for details on the field %% descriptors). For a `record_access' node, -%% `Info' represents the record name and the field name (or -%% if the record name is not included, only the field name; this is -%% allowed only in Mnemosyne-query syntax). For a +%% `Info' represents the record name and the field name. For a %% `record_index_expr' node, `Info' represents the %% record name and the name field name. %% @@ -1713,18 +1711,14 @@ analyze_record_expr(Node) -> F = erl_syntax:record_access_field(Node), case erl_syntax:type(F) of atom -> - case erl_syntax:record_access_type(Node) of - none -> - {record_access, erl_syntax:atom_value(F)}; - A -> - case erl_syntax:type(A) of - atom -> - {record_access, - {erl_syntax:atom_value(A), - erl_syntax:atom_value(F)}}; - _ -> - throw(syntax_error) - end + A = erl_syntax:record_access_type(Node), + case erl_syntax:type(A) of + atom -> + {record_access, + {erl_syntax:atom_value(A), + erl_syntax:atom_value(F)}}; + _ -> + throw(syntax_error) end; _ -> throw(syntax_error) |