Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.cc

    re82aa9df r99cad3aa  
    1010// Created On       : Sat May 16 13:26:29 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Aug 15 14:49:06 2016
    13 // Update Count     : 99
     12// Last Modified On : Wed Aug 17 23:14:16 2016
     13// Update Count     : 126
    1414//
    1515
     
    1717using namespace std;
    1818
    19 // Builder
    2019int ParseNode::indent_by = 4;
    21 
    22 ParseNode::ParseNode() : next( 0 ) {};
    23 ParseNode::ParseNode( const string *name ) : name( *name ), next( 0 ) { delete name; }
    24 ParseNode::ParseNode( const string &name ) : name( name ), next( 0 ) { }
    25 
    26 ParseNode::~ParseNode() {
    27         delete next;
    28 };
    29 
    30 ParseNode *ParseNode::get_last() {
    31         ParseNode *current = this;
    32 
    33         while ( current->get_next() != 0 )
    34         current = current->get_next();
    35         return current;
    36 }
    37 
    38 ParseNode *ParseNode::set_last( ParseNode *next_ ) {
    39         if ( next_ != 0 ) get_last()->next = next_;
    40         return this;
    41 }
    42 
    43 void ParseNode::print( std::ostream &os, int indent ) const {}
    44 
    45 
    46 void ParseNode::printList( std::ostream &os, int indent ) const {
    47         print( os, indent );
    48 
    49         if ( next ) {
    50                 next->printList( os, indent );
    51         } // if
    52 }
    5320
    5421// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.