Pelago
Compile-time code

Compile-time code and tests

meta for code that runs while compiling, test blocks, and the reserved words unsafe, ext and macro: what works today and what is not finished.

This chapter covers the parts of Pelago that are about the build rather than the running program.

FeatureWhat it isStatePage
meta fn, meta call()Run ordinary Pelago code while compiling and use the result as a constant.Worksmeta
test "name" { ... }A named block of checks.Parsed and checked; no runner yettest
unsafe, ext, macroReserved for low-level code, foreign functions and macros.Parsed; little or no meaning yetReserved words

Pelago has no preprocessor and no separate macro language: compile-time code is the same language, written with meta.

On this page