Show
Ignore:
Timestamp:
08/28/08 04:00:40 (4 months ago)
Author:
Chuck.Esterbrook
Message:

Added support for "extended initializers" which allow you to set properties of the object in the same call being used to create the object.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/Attributes.cobra

    r1583 r1591  
    1818                        expr = PostCallExpr(expr.token, IdentifierExpr(expr.token, expr.name), List<of Expr>()) 
    1919                _expr = expr to PostCallExpr 
     20                _expr.isForAttribute = true 
    2021 
    2122        get expr from var 
     
    3536                        if .compiler.symbolForName(name+'Attribute', true, false) 
    3637                                _expr = PostCallExpr(_expr.token, IdentifierExpr(_expr.token, name+'Attribute'), _expr.args) 
     38                                _expr.isForAttribute = true  # CC: use property set in initializer 
    3739                _expr.bindImp 
    38                 # TODO: check that the properties exist when using x=... 
    3940 
    4041        get typeForIdentifier as IType is override