Differences From Artifact [c08643c4271f8f35]:
- File
polemy/ast.d
- 2010-11-09 05:19:20 - part of checkin [8de5b49cdf] on branch trunk - split tricks module into a separate package. (user: kinaba) [annotate]
To Artifact [dd714695d64176f9]:
- File
polemy/ast.d
- 2010-11-09 10:28:08 - part of checkin [dc93ad8cf6] on branch trunk - layered exec expression @lay(...) added (user: kinaba) [annotate]
30 30 }
31 31
32 32 class VarExpression : AST
33 33 {
34 34 string var;
35 35 mixin SimpleClass;
36 36 }
37 +
38 +class LayeredExpression : AST
39 +{
40 + string lay;
41 + AST expr;
42 + mixin SimpleClass;
43 +}
37 44
38 45 class LetExpression : AST
39 46 {
40 47 string var;
41 48 string layer;
42 49 AST init;
43 50 AST expr;
................................................................................
68 75 template genEast(T)
69 76 { T genEast(P...)(P ps) { return new T(LexPosition.dummy, ps); } }
70 77
71 78 alias genEast!StrLiteral strl;
72 79 alias genEast!IntLiteral intl;
73 80 auto fun(string[] xs, AST ps) { return genEast!FunLiteral(xs,ps); } // to help type inference of D
74 81 alias genEast!VarExpression var;
82 + alias genEast!LayeredExpression lay;
75 83 alias genEast!LetExpression let;
76 84 alias genEast!FuncallExpression call;
77 85 }