implements the 'codegenDecl' pragma

This commit is contained in:
Araq 2013-06-27 18:13:11 +02:00
commit 139562cc64
7 changed files with 58 additions and 25 deletions

View file

@ -399,6 +399,21 @@ interfacing with libraries written in Objective C:
The compiler needs to be told to generate Objective C (command ``objc``) for
this to work. The conditional symbol ``objc`` is defined when the compiler
emits Objective C code.
CodegenDecl pragma
------------------
The `codegenDecl`:idx: pragma can be used to directly influence Nimrod's code
generator. It receives a format string that determines how the variable or
proc is declared in the generated code:
.. code-block:: nimrod
var
a {.codegenDecl: "$# progmem $#".}: int
proc myinterrupt() {.codegenDecl: "__interrupt $# $#$#".} =
echo "realistic interrupt handler"
LineDir option