Update %cg directives documentation

This commit is contained in:
Edwin Brady 2019-08-01 11:22:16 +01:00
parent 0b692e4379
commit 6edd724531

View File

@ -109,8 +109,8 @@ Syntax:
* `%cg <backend> <single-line instruction>` * `%cg <backend> <single-line instruction>`
* `%cg <backend> { <multi-line instructions> }` * `%cg <backend> { <multi-line instructions> }`
Injects the given instructions directly into the generated code for The given instructions are passed directly to the code generator, to be
the given backend. interpreted in a backend-specific way.
Currently known backends are: `chez`, `chicken` and `racket`. Currently known backends are: `chez`, `chicken` and `racket`.
@ -139,3 +139,9 @@ corresponding file-loading code:
Note the file is loaded referencing an absolute path of the first Note the file is loaded referencing an absolute path of the first
matching file found, except when it's the current directory in which matching file found, except when it's the current directory in which
case the file is simply referenced as `./library_name` case the file is simply referenced as `./library_name`
### Chicken
The directive should be scheme code which is inserted directly into the generated
code. This can be used, for example, to import external libraries, e.g.
`%cg chicken (use posix)`.