source: src/Parser/ParseNode.cc @ 1cb2282

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 1cb2282 was cbaee0d, checked in by Peter A. Buhr <pabuhr@…>, 8 years ago

more refactoring of parser code

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[b87a5ed]1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// ParseNode.cc --
8//
9// Author           : Rodolfo G. Esteves
10// Created On       : Sat May 16 13:26:29 2015
[ca35c51]11// Last Modified By : Peter A. Buhr
[cbaee0d]12// Last Modified On : Tue Aug 16 21:31:47 2016
13// Update Count     : 125
[b87a5ed]14//
15
[51b7345]16#include "ParseNode.h"
17using namespace std;
18
19int ParseNode::indent_by = 4;
20
[0da3e2c]21ParseNode::ParseNode() {};
22ParseNode::ParseNode( const string *name ) : name( *name ) { assert( false ); delete name; }
23ParseNode::ParseNode( const string &name ) : name( name ) { assert( false ); }
[51b7345]24
[59db689]25ParseNode::~ParseNode() {
[e869d663]26        delete next;
[51b7345]27};
28
[59db689]29ParseNode *ParseNode::get_last() {
[cbaee0d]30        ParseNode *current;
31        for ( current = this; current->get_next() != 0; current = current->get_next() );
[a08ba92]32        return current;
[51b7345]33}
34
[cbaee0d]35ParseNode *ParseNode::set_last( ParseNode *newlast ) {
36        if ( newlast != 0 ) get_last()->set_next( newlast );
[a08ba92]37        return this;
[51b7345]38}
39
40// Local Variables: //
[b87a5ed]41// tab-width: 4 //
42// mode: c++ //
43// compile-command: "make install" //
[51b7345]44// End: //
Note: See TracBrowser for help on using the repository browser.