
A directive starts with $; blanks may separate the $ from the keyword ($ MODULE works). Its arguments follow on the same line; the line then ends as described in Lines & Comments.
Two families:
Module directives set up the generated files — their names, the namespace, what they include:
| Directive | Page |
|---|---|
$MODULE name [HEADER ext] [SOURCE ext] [NOHEADER] [INLINE] | $MODULE |
$NAMESPACE a::b | $NAMESPACE |
$INCLUDE "file", <file> or MACRO | $INCLUDE |
$IMPORT file | $IMPORT |
$USING std::string | $USING |
$EXPORT MACRO | $EXPORT |
$LANGUAGE en | $LANGUAGE, $CHARSET |
Artefact directives — $STRING, $STREAMABLE, $ERROR, $EXCEPTION, $THROW, $SYSLOG — switch a kind of generated code on or off and set its naming. They are sticky: a setting applies to every $MESSAGE below it. See Artefact Directives.
$MESSAGE is a directive too; it opens a message — see Messages. Any directive closes the message above it.
An unknown keyword is an error that names it:
app.msg:12:1: error: unknown directive '$STRNG'

