Skip to content

holo-nim/glaze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glaze

Serialization/deserialization between typed NimNodes and compile time values. Use cases include:

  • storing values to/loading values from macrocaches
  • reading static/const values from custom pragma argument nodes or other typed AST

Unlike macros.newLit (which only does serialization), AST is generated to be "reversible" via the deserialization procs. Like macros.newLit, the serialized AST also works as literals for the serialized values. Deserialization also supports the AST of typed static values/constants, which is not always valid AST in normal code.

Serialization/deserialization of typed NimNodes themselves are also supported, however this is accomplished via a cache that does not shrink, so it is not meant to be overused. Untyped NimNodes can use something like macros.astGenRepr or the nuance library which also works at runtime.

About

typed NimNode serialization/deserialization

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages