Changeset 47498bd for src/SynTree
- Timestamp:
- Jun 19, 2018, 2:11:38 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 9a7a3b6
- Parents:
- 704d11e
- Location:
- src/SynTree
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Mutator.h
r704d11e r47498bd 114 114 virtual Type * mutate( ZeroType * zeroType ) = 0; 115 115 virtual Type * mutate( OneType * oneType ) = 0; 116 virtual Type * mutate( GlobalScopeType * globalType ) = 0; 116 117 117 118 virtual Designation * mutate( Designation * designation ) = 0 ; -
src/SynTree/SynTree.h
r704d11e r47498bd 124 124 class ZeroType; 125 125 class OneType; 126 class GlobalScopeType; 126 127 127 128 class Designation; -
src/SynTree/Type.cc
r704d11e r47498bd 118 118 119 119 void QualifiedType::print( std::ostream & os, Indenter indent ) const { 120 os << "Qualified Type: " ;120 os << "Qualified Type: " << endl; 121 121 printAll( types, os, indent+1 ); 122 122 Type::print( os, indent+1 ); 123 } 124 125 GlobalScopeType::GlobalScopeType() : Type( Type::Qualifiers(), {} ) {} 126 127 void GlobalScopeType::print( std::ostream & os, Indenter indent ) const { 128 os << "Global Scope Type" << endl; 123 129 } 124 130 -
src/SynTree/Type.h
r704d11e r47498bd 679 679 }; 680 680 681 class GlobalScopeType : public Type { 682 public: 683 GlobalScopeType(); 684 685 virtual GlobalScopeType *clone() const override { return new GlobalScopeType( *this ); } 686 virtual void accept( Visitor & v ) override { v.visit( this ); } 687 virtual Type *acceptMutator( Mutator & m ) override { return m.mutate( this ); } 688 virtual void print( std::ostream & os, Indenter indent = {} ) const override; 689 }; 690 681 691 // Local Variables: // 682 692 // tab-width: 4 // -
src/SynTree/Visitor.h
r704d11e r47498bd 116 116 virtual void visit( ZeroType * zeroType ) = 0; 117 117 virtual void visit( OneType * oneType ) = 0; 118 virtual void visit( GlobalScopeType * globalType ) = 0; 118 119 119 120 virtual void visit( Designation * designation ) = 0;
Note: See TracChangeset
for help on using the changeset viewer.