Artifact Content
Not logged in

Artifact 62182a8e7452f9e8c6baa2b8e743fba48bffee27


/**
 * 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;
import polemy.failure;

/// 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)
}

bool isMacroishLayer( Layer lay )
{
	return lay==MacroLayer || lay==RawMacroLayer;
}

bool isNoLayerChangeLayer( Layer lay )
{
	return lay==RawMacroLayer;
}