Janet 1.38.0-73334f3 Documentation
(Other Versions:
1.37.1
1.36.0
1.35.0
1.34.0
1.31.0
1.29.1
1.28.0
1.27.0
1.26.0
1.25.1
1.24.0
1.23.0
1.22.0
1.21.0
1.20.0
1.19.0
1.18.1
1.17.1
1.16.1
1.15.0
1.13.1
1.12.2
1.11.1
1.10.1
1.9.1
1.8.1
1.7.0
1.6.0
1.5.1
1.5.0
1.4.0
1.3.1
)
C-Janet
Index
cjanet/*cdef-list* cjanet/*cfun-list* cjanet/*indent* cjanet/@ cjanet/block cjanet/cdef cjanet/cfunction cjanet/declare cjanet/emit-block-end cjanet/emit-block-start cjanet/emit-blocks cjanet/emit-cdef cjanet/emit-cfunction cjanet/emit-comment cjanet/emit-declare cjanet/emit-function cjanet/emit-include cjanet/emit-indent cjanet/emit-module-entry cjanet/emit-preprocess cjanet/emit-typedef cjanet/function cjanet/include cjanet/mangle cjanet/module-entry cjanet/preprocess cjanet/type-split cjanet/typedef
(cdef name & more)
Define constant which will be registered in the module. It takes care of the docstring.
(cfunction name & more)
Define a C Function in cjanet. This also takes care of recording docstrings and such. Arity checking will be generated for you (by insertion of a call to janet_arity or janet_fixarity).
(emit-blocks statements)
Emit a number of statements in a bracketed block
(emit-cdef name & more)
Define constant which will be registered in the module. It takes care of the docstring.
(emit-cfunction name & more)
Functional form of cfunction
- takes the same arguments, but parameters must be manually quoted.
(emit-declare binding & form)
Emit a declaration of a variable or constant.
(emit-module-entry name)
Call this at the end of a cjanet module to add a module entry function.
(emit-preprocess & args)
Emit a line of source code for the pre-processor. For example (emit-preprocess "include" "<stdio.h>")
.
(emit-typedef name definition)
Emit a type declaration (C typedef).
(mangle token)
Convert any sequence of bytes to a valid C identifier in a way that is unlikely to collide. print-ir
will not
mangle symbols for you.
(module-entry name)
Call this at the end of a cjanet module to add a module entry function.
(type-split x &opt dflt-type)
Extract name and type from a variable. Allow typing variables as both (name type) or name:type as a shorthand. If no type is found, default to dflt-type. dflt-type itself defaults to 'auto