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 160 return new FunValue(delegate Value(immutable LexPosition pos, string lay, Value[] args){
161 161 if( e.params.length != args.length )
162 162 throw genex!RuntimeException(e.pos, sprintf!"Argument Number Mismatch (%d required but %d given)"
163 163 (e.params.length, args.length));
164 164 Table ctxNeo = new Table(ctx, Table.Kind.NotPropagateSet);
165 165 foreach(i,p; e.params)
166 - ctxNeo.set(p, lay, args[i]);
166 + ctxNeo.set(p.name, lay, args[i]);
167 167 return eval(e.funbody, ctxNeo, true, lay);
168 168 });
169 169 }
170 170 throw genex!RuntimeException(_e.pos, sprintf!"Unknown Kind of Expression %s"(typeid(_e)));
171 171 }
172 172
173 173 unittest