Differences From Artifact [ab3a0c217b77981b]:
- File
polemy/eval.d
- 2010-11-10 12:38:54 - part of checkin [38fcc662be] on branch trunk - cleaned up documentation comments (user: kinaba) [annotate]
To Artifact [9d70fd9339035713]:
- File
polemy/eval.d
- 2010-11-11 02:40:08 - part of checkin [8e6fa743ee] on branch trunk - added layered parameter AST (only AST. no parser and no evaluator). (user: kinaba) [annotate]
159 { 159 {
160 return new FunValue(delegate Value(immutable LexPosition pos, st 160 return new FunValue(delegate Value(immutable LexPosition pos, st
161 if( e.params.length != args.length ) 161 if( e.params.length != args.length )
162 throw genex!RuntimeException(e.pos, sprintf!"Arg 162 throw genex!RuntimeException(e.pos, sprintf!"Arg
163 (e.params.length, args.length)); 163 (e.params.length, args.length));
164 Table ctxNeo = new Table(ctx, Table.Kind.NotPropagateSet 164 Table ctxNeo = new Table(ctx, Table.Kind.NotPropagateSet
165 foreach(i,p; e.params) 165 foreach(i,p; e.params)
166 ctxNeo.set(p, lay, args[i]); | 166 ctxNeo.set(p.name, lay, args[i]);
167 return eval(e.funbody, ctxNeo, true, lay); 167 return eval(e.funbody, ctxNeo, true, lay);
168 }); 168 });
169 } 169 }
170 throw genex!RuntimeException(_e.pos, sprintf!"Unknown Kind of Expression 170 throw genex!RuntimeException(_e.pos, sprintf!"Unknown Kind of Expression
171 } 171 }
172 172
173 unittest 173 unittest