Tech News
← Home  ·  All topics

Macro Expansion

1 GoKawiil brief on this topic

Developer adds debugging macros like __print and __where to custom C preprocessor

David Priver, who is building his own C2Y compiler, interpreter and REPL as a personal project, detailed several custom extensions he added to its C preprocessor component. These include __print(), which writes the expanded value of a macro to stderr for debugging, __where(), which reports where a macro was originally defined, and __map(), designed to apply a transformation across a list of arguments.