[[tags: manual]]
[[toc:]]

== Unit expand

This unit has support for syntax- and module handling. This unit is used
by default, unless the program is compiled with the {{-explicit-use}}
option.

=== Macros

==== get-line-number

<procedure>(get-line-number EXPR)</procedure>

If {{EXPR}} is a pair with the car being a symbol, and line-number
information is available for this expression, then this procedure
returns the associated source file and line number as a string. If
line-number information is not available, then {{#f}} is returned.
Note that line-number information for expressions is only available in
the compiler.

==== expand

<procedure>(expand X)</procedure>

If {{X}} is a macro-form, expand the macro (and repeat expansion
until expression is a non-macro form).  Returns the resulting expression.

==== syntax-error

<procedure>(syntax-error [LOCATION] MESSAGE ARGUMENT ...)</procedure>

Signals an exception of the kind {{(exn syntax)}}. Otherwise identical to 
{{error}}.


==== er-macro-transformer

<procedure>(er-macro-transformer TRANSFORMER)</procedure>

This procedure does nothing and is available for writing low-level
macros in a more portable fashion, without hard-coding the signature
of a transformer procedure.


---
Previous: [[Unit library]]

Next: [[Unit data-structures]]
