minic CPython's structseq
Macros
macro cstructGenNamedTuple[T: object](desc: typedesc[T]; exported: static[bool] = true; mapCTypeToNim: static[MapCTypeToNim] = mapCTypeToNim)
- Generate with name "struct" prefix. Source Edit
macro cstructGenNamedTuple[T: object](desc: typedesc[T]; genName: static[string]; exported: static[bool] = true)
-
Generate a ref object type (because CPython's namedtuple is passed by ref), attr can be access via index (e.g. you can access the 1st attr via obj[0]).Note: all generated are exported if exported (default).Source Edit
macro declMapCTypeToNim(mapCTypeToNim; uniqueId = astToStr(mapCTypeToNim); additionalMaps)
- Source Edit
macro genNamedTuple[T: object](desc: typedesc[T]; stmtDef)
- Source Edit
Templates
template declMapCTypeToNim(mapCTypeToNim; uniqueId = astToStr(mapCTypeToNim)) {. dirty.}
- Source Edit