## print-hooks.pkg
## (C) 2001 Lucent Technologies, Bell Labs
# Compiled by:
#
src/lib/compiler/core.sublibstipulate
package ds = deep_syntax; # deep_syntax is from
src/lib/compiler/front/typer-stuff/deep-syntax/deep-syntax.pkg package err = error_message; # error_message is from
src/lib/compiler/front/basics/errormsg/error-message.pkg package pp = standard_prettyprinter; # standard_prettyprinter is from
src/lib/prettyprint/big/src/standard-prettyprinter.pkg package sci = sourcecode_info; # sourcecode_info is from
src/lib/compiler/front/basics/source/sourcecode-info.pkg package syx = symbolmapstack; # symbolmapstack is from
src/lib/compiler/front/typer-stuff/symbolmapstack/symbolmapstack.pkg package uds = unparse_deep_syntax; # unparse_deep_syntax is from
src/lib/compiler/front/typer/print/unparse-deep-syntax.pkgherein
package print_hooks
: (weak)
api {
# All output goes to controls::print::out:
#
unparse_deep_syntax_tree
:
syx::Symbolmapstack
->
ds::Declaration
->
Void;
}
{ fun unparse_deep_syntax_tree symbolmapstack declaration
=
pp::with_standard_prettyprinter
#
(err::default_plaint_sink ()) []
#
(\\ pp: pp::Prettyprinter
=
uds::unparse_declaration
( symbolmapstack,
NULL: Null_Or( sci::Sourcecode_Info )
)
pp
( declaration,
200 # Maximum prettyprint recursion depth.
)
);
};
end;