Ignore:
Timestamp:
Aug 16, 2016, 5:56:37 PM (8 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, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
29917c6
Parents:
7880579
Message:

more refactoring of parser code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r7880579 r0da3e2c  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug 16 08:37:47 2016
    13 // Update Count     : 527
     12// Last Modified On : Tue Aug 16 11:46:11 2016
     13// Update Count     : 533
    1414//
    1515
     
    4444        ParseNode( const std::string & );                                       // for copy constructing subclasses
    4545        virtual ~ParseNode();
    46         virtual ParseNode *clone() const { assert( false ); return nullptr; };
     46        virtual ParseNode *clone() const = 0;
    4747
    4848        ParseNode *get_next() const { return next; }
     
    5555
    5656        virtual void print( std::ostream &os, int indent = 0 ) const {}
    57         virtual void printList( std::ostream &os, int indent = 0 ) const;
     57        virtual void printList( std::ostream &os, int indent = 0 ) const {}
    5858  private:
    5959        static int indent_by;
    6060
    61         ParseNode *next;
     61        ParseNode *next = nullptr;
    6262        std::string name;
    6363}; // ParseNode
     
    7070        InitializerNode( InitializerNode *, bool aggrp = false, ExpressionNode *des = 0 );
    7171        ~InitializerNode();
     72        virtual InitializerNode *clone() const { assert( false ); return nullptr; }
    7273
    7374        ExpressionNode *get_expression() const { return expr; }
     
    101102        ExpressionNode( const ExpressionNode &other );
    102103        virtual ~ExpressionNode() {}
    103 
    104104        virtual ExpressionNode *clone() const { assert( false ); return nullptr; }
    105105
Note: See TracChangeset for help on using the changeset viewer.