Diff
Not logged in

Differences From Artifact [62182a8e7452f9e8]:

To Artifact [f9c1f3b744698d72]:


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