NuBake
A Nu code "baker".
Superclass: NSObject
Declared in: tools/nubake
This class is used by nubake, the standalone Nu code "baker", to automatically convert Nu code into equivalent Objective-C functions.
Methods
| + |
(id) |
bakeNuCode: |
(id) program |
|
intoMethod: |
(id) methodName |
|
ofCategory: |
(id) categoryName |
|
ofClass: |
(id) className |
This bakes Nu code into a class method that expands and evaluates it in the main parser context.
The purpose is to have methods like (MyClass macros) that can be called from Nu to install
macros and other helpers that are written in Nu and baked into Objective-C.
in tools/nubake
| + |
(id) |
bakeNuCode: |
(id) program |
|
intoFunction: |
(id) functionName |
|
standalone: |
(int) standalone |
Generate an Objective-C source file from parsed Nu source code.
The file will a function named 'functionName' that when called,
will construct a code tree that is identical to the specified program.
If 'standalone' is true, a 'main()' function will be included to allow
the file to be compiled, linked, and run standalone.
in tools/nubake
| + |
(id) |
expandNuExpression: |
(id) node |
Convert a Nu expression into an equivalent C expression.
Used internally.
Upon reading it, you might ask, "is this really all it takes?" It is.
in tools/nubake