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


cjanet/*cdef-list* keyword source

Array of C Constants defined in the current scope


cjanet/*cfun-list* keyword source

Array of C Functions defined in the current scope


cjanet/*indent* keyword source

current indent buffer


cjanet/@ macro source

(@ & args)


cjanet/block macro source

(block & args)


cjanet/cdef macro source

(cdef name & more)

Define constant which will be registered in the module. It takes care of the docstring.


cjanet/cfunction macro source

(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).


cjanet/declare macro source

(declare & args)


cjanet/emit-block-end function source

(emit-block-end &opt nl)


cjanet/emit-block-start function source

(emit-block-start)


cjanet/emit-blocks function source

(emit-blocks statements)

Emit a number of statements in a bracketed block


cjanet/emit-cdef function source

(emit-cdef name & more)

Define constant which will be registered in the module. It takes care of the docstring.


cjanet/emit-cfunction function source

(emit-cfunction name & more)

Functional form of cfunction - takes the same arguments, but parameters must be manually quoted.


cjanet/emit-comment function source

(emit-comment msg)

Emit a multi-line comment string for C


cjanet/emit-declare function source

(emit-declare binding & form)

Emit a declaration of a variable or constant.


cjanet/emit-function function source

(emit-function name & form)

Emit a C function definition.


cjanet/emit-include function source

(emit-include path)


cjanet/emit-indent function source

(emit-indent)


cjanet/emit-module-entry function source

(emit-module-entry name)

Call this at the end of a cjanet module to add a module entry function.


cjanet/emit-preprocess function source

(emit-preprocess & args)

Emit a line of source code for the pre-processor. For example (emit-preprocess "include" "<stdio.h>").


cjanet/emit-typedef function source

(emit-typedef name definition)

Emit a type declaration (C typedef).


cjanet/function macro source

(function & args)


cjanet/include macro source

(include path)


cjanet/mangle function source

(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.


cjanet/module-entry macro source

(module-entry name)

Call this at the end of a cjanet module to add a module entry function.


cjanet/preprocess macro source

(preprocess & args)


cjanet/type-split function source

(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


cjanet/typedef macro source

(typedef & args)