Artifact f9c1f3b744698d722aded29dcdec3d3408e80def
/**
* Authors: k.inaba
* License: NYSL 0.9982 http://www.kmonos.net/nysl/
*
* Definition of constants related to the layers.
*/
module polemy.layer;
import polemy._common;
/// Type for the layer ID
alias string Layer;
enum : Layer
{
SystemLayer = "(system)", /// Predefined layer for internal data
ValueLayer = "@value", /// Predefined layer for normal run
MacroLayer = "@macro", /// Predefined layer for macro run (@lay() changes layer)
RawMacroLayer = "(rawmacro)", /// Predefined layer for macro run (@lay() becomes AST)
}
/// True if it is macro-like layer that basically generates syntax tree
bool isMacroishLayer( Layer lay )
{
return lay==MacroLayer || lay==RawMacroLayer;
}
/// True if in the specified layer @lay(...) has no effect and merely produces a syntax tree
bool isNoLayerChangeLayer( Layer lay )
{
return lay==RawMacroLayer;
}