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 class VarExpression : AST 32 class VarExpression : AST
33 { 33 {
34 string var; 34 string var;
35 mixin SimpleClass; 35 mixin SimpleClass;
36 } 36 }
> 37
> 38 class LayeredExpression : AST
> 39 {
> 40 string lay;
> 41 AST expr;
> 42 mixin SimpleClass;
> 43 }
37 44
38 class LetExpression : AST 45 class LetExpression : AST
39 { 46 {
40 string var; 47 string var;
41 string layer; 48 string layer;
42 AST init; 49 AST init;
43 AST expr; 50 AST expr;
................................................................................................................................................................................
68 template genEast(T) 75 template genEast(T)
69 { T genEast(P...)(P ps) { return new T(LexPosition.dummy, ps); } 76 { T genEast(P...)(P ps) { return new T(LexPosition.dummy, ps); }
70 77
71 alias genEast!StrLiteral strl; 78 alias genEast!StrLiteral strl;
72 alias genEast!IntLiteral intl; 79 alias genEast!IntLiteral intl;
73 auto fun(string[] xs, AST ps) { return genEast!FunLiteral(xs,ps); } // t 80 auto fun(string[] xs, AST ps) { return genEast!FunLiteral(xs,ps); } // t
74 alias genEast!VarExpression var; 81 alias genEast!VarExpression var;
> 82 alias genEast!LayeredExpression lay;
75 alias genEast!LetExpression let; 83 alias genEast!LetExpression let;
76 alias genEast!FuncallExpression call; 84 alias genEast!FuncallExpression call;
77 } 85 }