Wiki
Show
Ignore:
Timestamp:
11/28/08 20:11:01 (3 years ago)
Author:
Chuck.Esterbrook
Message:

Added streams to the language. For example, int* or String*

Files:
1 modified

Legend:

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

    r1759 r1781  
    357357            return container.memberForName(.name) 
    358358        Generics have to do more work, though. 
     359        So do types with funky names. 
    359360        """ 
    360361        return container.memberForName(.name) 
     
    446447class NilableTypeIdentifier 
    447448    inherits WrappedTypeIdentifier 
     449    """ 
     450    Foo? 
     451    """ 
    448452 
    449453    def init(token as IToken, typeId as AbstractTypeIdentifier) 
     
    462466        else 
    463467            return m 
     468 
     469 
     470class StreamTypeIdentifier 
     471    inherits WrappedTypeIdentifier 
     472    """ 
     473    Foo* 
     474    """ 
     475 
     476    def init(token as IToken, typeId as AbstractTypeIdentifier) 
     477        base.init(token, typeId) 
     478     
     479    def _resolveType as IType is override 
     480        t = StreamType(_typeId.realType) 
     481        t.bindInh 
     482        t.bindInt 
     483        return t 
     484 
     485    get name as String is override 
     486        return _typeId.name + '*' 
    464487 
    465488