W Wrapl, The Programming Language

Libraries Wrapl.Preproc

Types

T

A preprocessor object.

Functions

New(out @ IO.Stream.WriterT, includes @ Agg.List.T) : T

Returns a new preprocessor object which writes the processed text to out. includes should be a list of directories to be searched when files are included.

Methods

:include(proc @ T, filename @ Std.String.T, strip = NIL)

Reads all input from the file filename, processes the text using proc and writes the output to proc:out. If strip is :strip, then empty lines in stream are not written to proc:out.

:include(proc @ T, stream @ IO.Stream.ReaderT, strip = NIL)

Reads all input from stream, processes the text using proc and writes the output to proc:out. If strip is :strip, then empty lines in stream are not written to proc:out.

:session(proc @ T) : Wrapl.Loader.SessionT

Returns the Wrapl session used to evalute embedded Wrapl code.