PreviousUpNext

15.3.340  src/lib/prettyprint/big/src/base-prettyprinter.api

## core-prettyprinter.api
#
# Support for prettyprinting plain ascii text --
# a workhorse tool used by about eighty packages.

# Compiled by:
#     src/lib/prettyprint/big/prettyprinter.lib



api Base_Prettyprinter {
    #
    include api Core_Prettyprinter;                                                             # Core_Prettyprinter    is from   src/lib/prettyprint/big/src/core-prettyprinter.api
    #
    shut_box:                                   Pp -> Void;

    lit:                                        Pp ->   String -> Void;                         # 'lit' == 'literal (text)' -- text that does not get interpreted in any way, just printed as presented.
    endlit:                                     Pp ->   String -> Void;                         # Nearly identical to 'lit'. A special hack so a ';' can be at the end of the preceding box instead of on a line by itself.

    break:                Pp -> { blanks: Int,  indent_on_wrap: Int } -> Void;

    blank:                Pp -> Int -> Void;                                                    # blank n == break { blanks=n, indent_on_wrap=0 } 
    cut:                  Pp -> Void;                                                           # Cut == break { blanks=0, indent_on_wrap=0 } 
    newline:              Pp -> Void;
    nonbreakable_blanks:  Pp -> Int -> Void;                                                    # Emit a nonbreakable blank 
    tab:                  Pp -> { blanks: Int, tab_to: Int, tabstops_are_every: Int } -> Void;  # Space over until   (column % tabstops_are_every) == i   where tabstops_are_every defaults to 4.


    push_texttraits:    (Pp, Texttraits) -> Void;
    pop_texttraits:      Pp -> Void;


    control:              Pp -> (Prettyprint_Output_Stream -> Void) -> Void;
};


Comments and suggestions to: bugs@mythryl.org

PreviousUpNext