/littlesugar

Nim macros that might help writing simpler and safer code.

Primary LanguageNimMIT LicenseMIT

littlesugar

This is Nim macros that might help writing simpler and safer code.

document

List of modules

Creates a while statement with named blocks so that you can easily leave or continue the while loop in double (or deeper) loop.

Creates a new scope with aliases so that you can use them safely.

It provides procedures work like cast in Nim, but slightly safer.

Recursively replaces all NimNode subtrees that matches given NimNode tree with specified NimNode tree.

Expand specified macro or template before expanding other macros or templates.

Assign an anonymous procedure to a procedual type variable easily.

This is similar to std/deques, but has fixed size storage that can be allocated on stack.

This is similar to seq, but internal storage size is fixed to N and it can be allocated on stack.

Reinterpret the given pointer to a different pointer type.

Unpack tuples or arrrays to arguments for a procedure call or an array constructor.