aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-06-04 14:41:11 +0200
committerFredrik Gustafsson <[email protected]>2013-06-04 14:41:11 +0200
commit57b24ccd49fc005d685aeebd363531a8ed86e6bc (patch)
treecccfa608d4aa543a60151352fbdbec01760b2c42 /lib/stdlib/src
parente83fd8f94aba352b6cc055d2b4cfff007911b6d4 (diff)
parent66c5325d80aaee54bda10ff0ebb4c79a4fea24d0 (diff)
downloadotp-57b24ccd49fc005d685aeebd363531a8ed86e6bc.tar.gz
otp-57b24ccd49fc005d685aeebd363531a8ed86e6bc.tar.bz2
otp-57b24ccd49fc005d685aeebd363531a8ed86e6bc.zip
Merge branch 'maint'
Conflicts: bootstrap/lib/stdlib/ebin/erl_pp.beam
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_pp.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index c0596e5ba6..657cb5d34c 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -214,7 +214,9 @@ lattribute({attribute,_Line,type,Type}, Opts, _State) ->
lattribute({attribute,_Line,opaque,Type}, Opts, _State) ->
[typeattr(opaque, Type, Opts),leaf(".\n")];
lattribute({attribute,_Line,spec,Arg}, _Opts, _State) ->
- [specattr(Arg),leaf(".\n")];
+ [specattr(spec, Arg),leaf(".\n")];
+lattribute({attribute,_Line,callback,Arg}, _Opts, _State) ->
+ [specattr(callback, Arg),leaf(".\n")];
lattribute({attribute,_Line,Name,Arg}, Opts, State) ->
[lattribute(Name, Arg, Opts, State),leaf(".\n")].
@@ -311,14 +313,14 @@ union_elem(T) ->
tuple_type(Ts, F) ->
{seq,${,$},[$,],ltypes(Ts, F)}.
-specattr({FuncSpec,TypeSpecs}) ->
+specattr(SpecKind, {FuncSpec,TypeSpecs}) ->
Func = case FuncSpec of
{F,_A} ->
format("~w", [F]);
{M,F,_A} ->
format("~w:~w", [M, F])
end,
- {first,leaf("-spec "),
+ {first,leaf(lists:concat(["-", SpecKind, " "])),
{list,[{first,leaf(Func),spec_clauses(TypeSpecs)}]}}.
spec_clauses(TypeSpecs) ->