Ignore:
Timestamp:
Jul 12, 2019, 10:49:02 AM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
ef5b828
Parents:
ee6dbae
Message:

Cast cost and conversion cost now take constant parameters.
This required supporting visiting const node.
The PassVisitor? can now visit const nodes but not when using the Indexer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Constant.h

    ree6dbae r7870799  
    3333        virtual ~Constant();
    3434
    35         virtual Constant * clone() const { return new Constant( *this ); }
     35        virtual Constant * clone() const override { return new Constant( *this ); }
    3636
    3737        Type * get_type() { return type; }
     
    5151        static Constant null( Type * ptrtype = nullptr );
    5252
    53         virtual void accept( Visitor & v ) { v.visit( this ); }
    54         virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); }
    55         virtual void print( std::ostream & os, Indenter indent = 0 ) const;
    56   private:
     53        virtual void accept( Visitor & v ) override { v.visit( this ); }
     54        virtual void accept( Visitor & v ) const override { v.visit( this ); }
     55        virtual Constant * acceptMutator( Mutator & m ) override { return m.mutate( this ); }
     56        virtual void print( std::ostream & os, Indenter indent = 0 ) const override;
     57
    5758        Type * type;
    5859        std::string rep;
    5960        std::optional<unsigned long long> ival;
    60 
    61         friend class ConverterOldToNew;
    6261};
    6362
Note: See TracChangeset for help on using the changeset viewer.