Changeset 1598 for cobra/trunk/Source/Expr.cobra
- Timestamp:
- 08/28/08 06:40:46 (4 months ago)
- Files:
-
- 1 modified
-
cobra/trunk/Source/Expr.cobra (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/Expr.cobra
r1591 r1598 1479 1479 """ 1480 1480 box = .compiler.curBox 1481 token = box.token.copy 1481 1482 paramsForDecl = List<of Param>() 1482 1483 argsForInitCall = List<of Expr>() # args to pass to `Foo(arg0, arg1)` … … 1490 1491 arg = arg.right 1491 1492 else 1492 argsForInitCall.add( arg)1493 argsForInitCall.add(IdentifierExpr(token.copy('ID', 'arg[i]'))) 1493 1494 paramsForDecl.add(Param(box.token.copy('ID', 'arg[i]'), arg.type)) 1494 1495 i += 1 1495 1496 name = '_ch_ext_init_[.serialNum]' # ch = class helper, ext = extended, init = initializer 1496 token = box.token.copy 1497 m = Method(token.copy('ID', name), box, name, paramsForDecl, _type, nil, ['shared'], AttributeList(), '') 1497 m = Method(token.copy('ID', name), box, name, paramsForDecl, _type, nil, ['shared', 'private'], AttributeList(), '') 1498 1498 m.locals.add(LocalVar(token.copy('ID', 'obj'), .type)) 1499 1499
