## unparse-raw-syntax.api
## Jing Cao and Lukasz Ziarek
# Compiled by:
#
src/lib/compiler/front/typer/typer.sublib### "C++ is history repeated as tragedy.
### Java is history repeated as farce."
###
### -- Scott McKay
# We refer to a literal dump of the raw syntax tree as "prettyprinting".
# We refer to reconstruction of surface syntax from the raw syntax tree as "unparsing".
# Unparsing is good for end-user diagnostics; prettyprinting is good for compiler debugging.
# This is the api for our raw syntax unparser.
# The matching implementation is in
src/lib/compiler/front/typer/print/unparse-raw-syntax.pkg# For our raw syntax prettyprinter, see
src/lib/compiler/front/typer/print/prettyprint-raw-syntax.apistipulate
package pp = standard_prettyprinter; # standard_prettyprinter is from
src/lib/prettyprint/big/src/standard-prettyprinter.pkg package raw = raw_syntax; # raw_syntax is from
src/lib/compiler/front/parser/raw-syntax/raw-syntax.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.pkgherein
api Unparse_Raw_Syntax {
#
unparse_expression: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Raw_Expression, Int)
-> Void;
unparse_pattern: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Case_Pattern, Int)
-> Void;
unparse_package_expression: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Package_Expression, Int)
-> Void;
unparse_generic_expression: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Generic_Expression, Int)
-> Void;
unparse_where_spec: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Where_Spec, Int)
-> Void;
unparse_api_expression: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Api_Expression, Int)
-> Void;
unparse_generic_api_expression: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Generic_Api_Expression, Int)
-> Void;
unparse_specification: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Api_Element, Int)
-> Void;
unparse_declaration: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Declaration, Int)
-> Void;
unparse_named_value: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Value, Int)
-> Void;
unparse_named_recursive_values: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Recursive_Value, Int)
-> Void;
unparse_named_sml_function
: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> String
-> (raw::Named_Function, Int)
-> Void;
unparse_pattern_clause
: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Pattern_Clause, Int)
-> Void;
unparse_named_lib7function
: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> String
-> (raw::Nada_Named_Function, Int)
-> Void;
unparse_lib7pattern_clause
: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Nada_Pattern_Clause, Int)
-> Void;
unparse_named_type: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Type, Int)
-> Void;
unparse_sumtype: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Sumtype, Int)
-> Void;
unparse_sumtype_right_hand_side: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Sumtype_Right_Hand_Side, Int)
-> Void;
unparse_named_exception: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Exception, Int)
-> Void;
unparse_named_package: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Package, Int)
-> Void;
unparse_named_generic: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Named_Generic, Int)
-> Void;
unparse_typevar: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Typevar, Int)
-> Void;
unparse_type: (syx::Symbolmapstack,
Null_Or( sci::Sourcecode_Info ))
-> pp::Prettyprinter
-> (raw::Any_Type, Int)
-> Void;
};
end;
## Copyright 2003 by University of Chicago
## Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
## released per terms of SMLNJ-COPYRIGHT.