implements the 'codegenDecl' pragma
This commit is contained in:
parent
6d7ad66982
commit
139562cc64
7 changed files with 58 additions and 25 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue