Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/smlnj-lib/PP/src/pp-desc.sml
ViewVC logotype

Annotation of /sml/trunk/src/smlnj-lib/PP/src/pp-desc.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 409 - (view) (download)

1 : monnier 409 (* pp-desc.sml
2 :     *
3 :     * COPYRIGHT (c) 1999 Bell Labs, Lucent Technologies.
4 :     *
5 :     * A tree representation of pretty printing directives.
6 :     *)
7 :    
8 :     structure PPDesc =
9 :     struct
10 :    
11 :     datatype indent
12 :     = Abs of int (* indent relative to outer indentation *)
13 :     | Rel of int (* indent relative to start of box *)
14 :    
15 :     (* The pp_desc type is parameterized over the token, style, and device
16 :     * types.
17 :     *)
18 :     datatype ('tok, 'sty, 'dev) pp_desc
19 :     = HBox of ('tok, 'sty, 'dev) pp_desc list
20 :     | VBox of (indent * ('tok, 'sty, 'dev) pp_desc list)
21 :     | HVBox of (indent * ('tok, 'sty, 'dev) pp_desc list)
22 :     | HOVBox of (indent * ('tok, 'sty, 'dev) pp_desc list)
23 :     | Box of (indent * ('tok, 'sty, 'dev) pp_desc list)
24 :     | Token of 'tok
25 :     | String of string
26 :     | Style of ('sty * ('tok, 'sty, 'dev) pp_desc list)
27 :     | Break of {nsp : int, offset : int}
28 :     | NewLine
29 :     | NBSpace of int
30 :     | Control of ('dev -> unit)
31 :    
32 :     end;
33 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0