Changeset b13fc10 for src/SynTree
- Timestamp:
- May 3, 2017, 3:15:09 PM (9 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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 9643b31
- Parents:
- 1ed841f (diff), dba6db9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/SynTree
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/PointerType.cc
r1ed841f rb13fc10 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // PointerType.cc -- 7 // PointerType.cc -- 8 8 // 9 9 // Author : Richard C. Bilson … … 38 38 void PointerType::print( std::ostream &os, int indent ) const { 39 39 Type::print( os, indent ); 40 os << "pointer to "; 41 if ( isStatic ) { 42 os << "static "; 43 } // if 44 if ( isVarLen ) { 45 os << "variable length array of "; 46 } else if ( dimension ) { 47 os << "array of "; 48 dimension->print( os, indent ); 49 } // if 40 if ( ! is_array() ) { 41 os << "pointer to "; 42 } else { 43 os << "decayed "; 44 if ( isStatic ) { 45 os << "static "; 46 } // if 47 if ( isVarLen ) { 48 os << "variable length array of "; 49 } else if ( dimension ) { 50 os << "array of "; 51 dimension->print( os, indent ); 52 os << " "; 53 } // if 54 } 50 55 if ( base ) { 51 56 base->print( os, indent ); -
src/SynTree/Type.h
r1ed841f rb13fc10 247 247 void set_isStatic( bool newValue ) { isStatic = newValue; } 248 248 249 bool is_array() const { return isStatic || isVarLen || dimension; } 250 249 251 virtual PointerType *clone() const { return new PointerType( *this ); } 250 252 virtual void accept( Visitor & v ) { v.visit( this ); } -
src/SynTree/Visitor.h
r1ed841f rb13fc10 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Thu Feb 9 14:23:24201711 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 3 08:58:00 2017 13 13 // Update Count : 10 14 14 // … … 26 26 virtual ~Visitor(); 27 27 public: 28 // visit: Default implementation of all functions visits the children 29 // of the given syntax node, but performs no other action. 30 28 31 virtual void visit( ObjectDecl *objectDecl ); 29 32 virtual void visit( FunctionDecl *functionDecl );
Note:
See TracChangeset
for help on using the changeset viewer.