Clearly 'Self' can't be this. Although, this way is no better.
catseye
9 years ago
213 | 213 | data Object = IntVal Integer |
214 | 214 | | ObjVal String (Map Name Object) |
215 | 215 | | ContVal (Map Name Object) ContV |
216 | | Self | |
217 | 216 | | Null |
218 | 217 | deriving (Show, Eq) |
219 | 218 | |
261 | 260 | case (length actuals) - (length formals) of |
262 | 261 | 0 -> |
263 | 262 | let |
263 | self = (ContVal EmptyMap (ContV id)) -- NO NOT REALLY | |
264 | 264 | ctx = buildContext formals actuals |
265 | ctx' = set "self" Self ctx | |
265 | ctx' = set "self" self ctx | |
266 | 266 | ctx'' = set "other" other ctx' |
267 | 267 | in |
268 | 268 | evalStatement p ctx'' stmt id |