Ignore:
Timestamp:
Mar 2, 2016, 6:15:02 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
36ebd03, b63e376
Parents:
8f610e85
Message:

change keyword type to otype and context to trait

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/iterator

    r8f610e85 r4040425  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Jan 27 23:49:13 2016
    13 // Update Count     : 7
     12// Last Modified On : Wed Mar  2 18:06:05 2016
     13// Update Count     : 9
    1414//
    1515
     
    1818
    1919// An iterator can be used to traverse a data structure.
    20 context iterator( type iterator_type, type elt_type ) {
     20trait iterator( otype iterator_type, otype elt_type ) {
    2121        // point to the next element
    2222//      iterator_type ?++( iterator_type * );
     
    3232};
    3333
    34 context iterator_for( type iterator_type, type collection_type, type elt_type | iterator( iterator_type, elt_type ) ) {
     34trait iterator_for( otype iterator_type, otype collection_type, otype elt_type | iterator( iterator_type, elt_type ) ) {
    3535//      [ iterator_type begin, iterator_type end ] get_iterators( collection_type );
    3636        iterator_type begin( collection_type );
     
    3838};
    3939
    40 forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
     40forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
    4141void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
    4242
    43 forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
     43forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) )
    4444void for_each_reverse( iterator_type begin, iterator_type end, void (*func)( elt_type ) );
    4545
Note: See TracChangeset for help on using the changeset viewer.