Diff
Not logged in

Differences From Artifact [62182a8e7452f9e8]:

To Artifact [f9c1f3b744698d72]:


2 * Authors: k.inaba 2 * Authors: k.inaba 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 3 * License: NYSL 0.9982 http://www.kmonos.net/nysl/ 4 * 4 * 5 * Definition of constants related to the layers. 5 * Definition of constants related to the layers. 6 */ 6 */ 7 module polemy.layer; 7 module polemy.layer; 8 import polemy._common; 8 import polemy._common; 9 import polemy.failure; < 10 9 11 /// Type for the layer ID 10 /// Type for the layer ID 12 11 13 alias string Layer; 12 alias string Layer; 14 13 15 enum : Layer 14 enum : Layer 16 { 15 { 17 SystemLayer = "(system)", /// Predefined layer for internal data 16 SystemLayer = "(system)", /// Predefined layer for internal data 18 ValueLayer = "@value", /// Predefined layer for normal run 17 ValueLayer = "@value", /// Predefined layer for normal run 19 MacroLayer = "@macro", /// Predefined layer for macro run (@lay() 18 MacroLayer = "@macro", /// Predefined layer for macro run (@lay() 20 RawMacroLayer = "(rawmacro)", /// Predefined layer for macro run (@lay() 19 RawMacroLayer = "(rawmacro)", /// Predefined layer for macro run (@lay() 21 } 20 } 22 21 > 22 /// True if it is macro-like layer that basically generates syntax tree > 23 23 bool isMacroishLayer( Layer lay ) 24 bool isMacroishLayer( Layer lay ) 24 { 25 { 25 return lay==MacroLayer || lay==RawMacroLayer; 26 return lay==MacroLayer || lay==RawMacroLayer; 26 } 27 } > 28 > 29 /// True if in the specified layer @lay(...) has no effect and merely produces a 27 30 28 bool isNoLayerChangeLayer( Layer lay ) 31 bool isNoLayerChangeLayer( Layer lay ) 29 { 32 { 30 return lay==RawMacroLayer; 33 return lay==RawMacroLayer; 31 } 34 }