Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.proto.hpp

    reb211bf rc600df1  
    2323class Pass;
    2424
    25 class TranslationUnit;
     25struct TranslationUnit;
    2626
    2727struct PureVisitor;
     
    123123                static constexpr bool value = std::is_void< ret_t >::value ||
    124124                        std::is_base_of<const node_t, typename std::remove_pointer<ret_t>::type >::value;
    125         };
    126 
    127         /// The result is a single node.
    128         template< typename node_t >
    129         struct result1 {
    130                 bool differs;
    131                 const node_t * value;
    132 
    133                 template< typename object_t, typename super_t, typename field_t >
    134                 void apply( object_t *, field_t super_t::* field );
    135         };
    136 
    137         /// The result is a container of statements.
    138         template< template<class...> class container_t >
    139         struct resultNstmt {
    140                 /// The delta/change on a single node.
    141                 struct delta {
    142                         ptr<Stmt> new_val;
    143                         ssize_t old_idx;
    144                         bool is_old;
    145 
    146                         delta(const Stmt * s, ssize_t i, bool old) :
    147                                 new_val(s), old_idx(i), is_old(old) {}
    148                 };
    149 
    150                 bool differs;
    151                 container_t< delta > values;
    152 
    153                 template< typename object_t, typename super_t, typename field_t >
    154                 void apply( object_t *, field_t super_t::* field );
    155 
    156                 template< template<class...> class incontainer_t >
    157                 void take_all( incontainer_t<ptr<Stmt>> * stmts );
    158 
    159                 template< template<class...> class incontainer_t >
    160                 void take_all( incontainer_t<ptr<Decl>> * decls );
    161         };
    162 
    163         /// The result is a container of nodes.
    164         template< template<class...> class container_t, typename node_t >
    165         struct resultN {
    166                 bool differs;
    167                 container_t<ptr<node_t>> values;
    168 
    169                 template< typename object_t, typename super_t, typename field_t >
    170                 void apply( object_t *, field_t super_t::* field );
    171125        };
    172126
Note: See TracChangeset for help on using the changeset viewer.