cnotes.h

cnotes.h

Single header C meta-programming library.

cnotes.h parses pre-processed C translation units (.i files), builds a typed abstract syntax tree, resolves symbols and bindings, and evaluates constant expressions, all within a single #include. It is meant for code generation, introspection and static analysis without large build systems or dependencies.

Contents

Pipeline

  1. source.c
  2. pre-processor
  3. source.i
  4. cnotes.h hooks
  5. modified .i
  6. compiler