Changeset 982ed5b for src/SynTree
- Timestamp:
- May 5, 2017, 1:38:42 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:
- 805c167, c352893
- Parents:
- 43426d4 (diff), 4f9636f (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:
-
- 4 edited
-
BaseSyntaxNode.h (modified) (1 diff)
-
Declaration.h (modified) (1 diff)
-
SynTree.h (modified) (1 diff)
-
TypeDecl.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/BaseSyntaxNode.h
r43426d4 r982ed5b 18 18 19 19 #include "Common/utility.h" 20 #include "Visitor.h" 20 21 21 22 class BaseSyntaxNode { 22 23 public: 23 24 CodeLocation location; 25 26 virtual void accept( Visitor & v ) = 0; // temporary -- needs to be here so that BaseSyntaxNode is polymorphic and can be dynamic_cast 24 27 }; 25 28 -
src/SynTree/Declaration.h
r43426d4 r982ed5b 204 204 205 205 virtual std::string typeString() const; 206 virtual std::string genTypeString() const; 206 207 207 208 virtual TypeDecl *clone() const { return new TypeDecl( *this ); } -
src/SynTree/SynTree.h
r43426d4 r982ed5b 21 21 #include <map> 22 22 #include <iostream> 23 24 class BaseSyntaxNode; 23 25 24 26 class Declaration; -
src/SynTree/TypeDecl.cc
r43426d4 r982ed5b 29 29 } 30 30 31 std::string TypeDecl::genTypeString() const { 32 static const std::string kindNames[] = { "otype", "dtype", "ftype", "ttype" }; 33 return kindNames[ kind ]; 34 } 35 31 36 std::ostream & operator<<( std::ostream & os, const TypeDecl::Data & data ) { 32 37 return os << data.kind << ", " << data.isComplete;
Note:
See TracChangeset
for help on using the changeset viewer.