diff options
author | Araq <rumpf_a@web.de> | 2013-06-27 18:13:11 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-06-27 18:13:11 +0200 |
commit | 139562cc643c7a4b201b25892d9cc949d3c4e5b8 (patch) | |
tree | d4bf55ee5ddb6541cdafd39fe02d7a611a3dfa75 /doc/nimrodc.txt | |
parent | 6d7ad6698296f9460fe3bf5fe4a3ef188608a9f5 (diff) | |
download | Nim-139562cc643c7a4b201b25892d9cc949d3c4e5b8.tar.gz |
implements the 'codegenDecl' pragma
Diffstat (limited to 'doc/nimrodc.txt')
-rw-r--r-- | doc/nimrodc.txt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 339cee382..ae169829f 100644 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -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 |