Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Node.hpp

    r76ed81f r8abee136  
    9494std::ostream& operator<< ( std::ostream& out, const Node * node );
    9595
    96 /// Call a visitor on a possibly-null node
    97 template<typename node_t>
    98 auto maybe_accept( const node_t * n, Visitor & v ) -> decltype( n->accept(v) ) {
    99         return n ? n->accept( v ) : nullptr;
    100 }
    101 
    10296/// Base class for the smart pointer types
    10397/// should never really be used.
     
    121115        template<typename o_node_t>
    122116        ptr_base & operator=( const o_node_t * node ) {
    123                 assign(strict_dynamic_cast<const node_t *>(node));
     117                assign( node ? strict_dynamic_cast<const node_t *>(node) : nullptr );
    124118                return *this;
    125119        }
     
    146140        template<typename o_node_t>
    147141        const o_node_t * as() const { return dynamic_cast<const o_node_t *>(node); }
    148 
    149         /// Returns a mutable version of the pointer in this node.
    150         node_t * get_and_mutate();
    151142
    152143        /// Sets this pointer to a mutated version of a pointer (possibly) owned elsehere.
Note: See TracChangeset for help on using the changeset viewer.