Chic documentation
Houlder Technologies


Macros and preprocessing
Home
Features
Tutorial
Examples
FAQ
Reference
Download
Mailing list
Contact

When Chic parses a file it also performs C++ preprocessing. It follows include directives, defines and undefines macros, and expands macros apparently like an ordinary C++ preprocessor. But it differs in several ways. Most importantly, Chic does not continue parsing in included files, it only scans them for macros. So you cannot, say, start a class in one file and continue it in another.

Include directives

If Chic cannot find an #included file it doesn't complain. This lets you select precisely what you want and what you don't want in the project.

Preprocessing conditionals

The preprocessing conditionals are if, ifdef, ifndef, elif, else, and endif. Chic follows the conditionals just like an ordinary C++ preprocessor. But Chic also performs preprocessing when generating compile files from a hic-file. That means that preprocessing conditionals outside function bodies will influence the generated files. To avoid surprises, the rule is simple, don't use preprocessing conditionals outside function bodies in hic-files.

Parameters that govern macros