aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_parse.yrl
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-05-14 15:19:38 +0200
committerMarcus Arendt <[email protected]>2014-05-14 15:19:38 +0200
commit557ac6b188521182889a6687918ca85929fd883b (patch)
tree1cffda17028a9efcc6bf499be38e2f4b5dbc64af /lib/stdlib/src/erl_parse.yrl
parenta21e69bc29d913a4f2d63abe1550a9ce97579e72 (diff)
parent5ade234d37600ea80dbb309f431c615937ea253d (diff)
downloadotp-557ac6b188521182889a6687918ca85929fd883b.tar.gz
otp-557ac6b188521182889a6687918ca85929fd883b.tar.bz2
otp-557ac6b188521182889a6687918ca85929fd883b.zip
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/src/erl_parse.yrl')
-rw-r--r--lib/stdlib/src/erl_parse.yrl21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 828870d492..a626d98ee4 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -860,10 +860,12 @@ build_fun(Line, Cs) ->
end.
check_clauses(Cs, Name, Arity) ->
- mapl(fun ({clause,L,N,As,G,B}) when N =:= Name, length(As) =:= Arity ->
- {clause,L,As,G,B};
- ({clause,L,_N,_As,_G,_B}) ->
- ret_err(L, "head mismatch") end, Cs).
+ [case C of
+ {clause,L,N,As,G,B} when N =:= Name, length(As) =:= Arity ->
+ {clause,L,As,G,B};
+ {clause,L,_N,_As,_G,_B} ->
+ ret_err(L, "head mismatch")
+ end || C <- Cs].
build_try(L,Es,Scs,{Ccs,As}) ->
{'try',L,Es,Scs,Ccs,As}.
@@ -873,17 +875,6 @@ ret_err(L, S) ->
{location,Location} = get_attribute(L, location),
return_error(Location, S).
-%% mapl(F,List)
-%% an alternative map which always maps from left to right
-%% and makes it possible to interrupt the mapping with throw on
-%% the first occurence from left as expected.
-%% can be removed when the jam machine (and all other machines)
-%% uses the standardized (Erlang 5.0) evaluation order (from left to right)
-mapl(F, [H|T]) ->
- V = F(H),
- [V | mapl(F,T)];
-mapl(_, []) ->
- [].
%% Convert between the abstract form of a term and a term.