Ignore:
Timestamp:
Aug 31, 2020, 6:55:22 PM (4 years ago)
Author:
Fangren Yu <f37yu@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
25a1cb0, 68f0c4e
Parents:
49a980b
Message:

pure visitor interface for new ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/TypeSubstitution.hpp

    r49a980b rd3aa64f  
    159159
    160160// definitition must happen after PassVisitor is included so that WithGuards can be used
    161 struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter> {
     161struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter>, public PureVisitor {
    162162                static size_t traceId;
    163163
     
    187187        assert( input );
    188188        Pass<Substituter> sub( *this, false );
    189         input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     189//      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     190        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    190191        return { input, sub.core.subCount };
    191192}
     
    195196        assert( input );
    196197        Pass<Substituter> sub( *this, true );
    197         input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     198//      input = strict_dynamic_cast< const SynTreeClass * >( deepCopy(input)->accept( sub ) );
     199        input = strict_dynamic_cast< const SynTreeClass * >( input->accept( sub ) );
    198200        return { input, sub.core.subCount };
    199201}
Note: See TracChangeset for help on using the changeset viewer.