Changeset 9feb34b for src/SynTree


Ignore:
Timestamp:
Mar 29, 2023, 11:07:03 AM (2 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
afdb74b
Parents:
60380a1
Message:

Moved toString and toCString to a new header. Updated includes. cassert was somehow getting instances of toString before but that stopped working so I embedded the new smaller include.

Location:
src/SynTree
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Type.cc

    r60380a1 r9feb34b  
    1616
    1717#include "Attribute.h"                // for Attribute
     18#include "Common/ToString.hpp"        // for toCString
    1819#include "Common/utility.h"           // for cloneAll, deleteAll, printAll
    1920#include "InitTweak/InitTweak.h"      // for getPointerBase
     
    105106int Type::referenceDepth() const { return 0; }
    106107
     108AggregateDecl * Type::getAggr() const {
     109        assertf( false, "Non-aggregate type: %s", toCString( this ) );
     110}
     111
    107112TypeSubstitution Type::genericSubstitution() const { assertf( false, "Non-aggregate type: %s", toCString( this ) ); }
    108113
  • src/SynTree/Type.h

    r60380a1 r9feb34b  
    2424#include "BaseSyntaxNode.h"  // for BaseSyntaxNode
    2525#include "Common/Iterate.hpp"// for operator+
    26 #include "Common/utility.h"  // for toCString
    2726#include "Mutator.h"         // for Mutator
    2827#include "SynTree.h"         // for AST nodes
     
    186185        virtual bool isComplete() const { return true; }
    187186
    188         virtual AggregateDecl * getAggr() const { assertf( false, "Non-aggregate type: %s", toCString( this ) ); }
     187        virtual AggregateDecl * getAggr() const;
    189188
    190189        virtual TypeSubstitution genericSubstitution() const;
Note: See TracChangeset for help on using the changeset viewer.