Changeset 7821d6c for src/SynTree
- Timestamp:
- Oct 3, 2017, 2:55:17 PM (7 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:
- 680620d
- Parents:
- 21b7161 (diff), e1ff775 (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:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Constant.cc
r21b7161 r7821d6c 71 71 } 72 72 73 void Constant::print( std::ostream &os ) const {73 void Constant::print( std::ostream &os, int indent ) const { 74 74 os << "(" << rep << " " << val.ival; 75 75 if ( type ) { -
src/SynTree/Constant.h
r21b7161 r7821d6c 19 19 #include <string> // for string 20 20 21 #include "BaseSyntaxNode.h" 21 22 #include "Mutator.h" // for Mutator 22 23 #include "Visitor.h" // for Visitor … … 24 25 class Type; 25 26 26 class Constant {27 class Constant : public BaseSyntaxNode { 27 28 public: 28 29 Constant( Type * type, std::string rep, unsigned long long val ); … … 30 31 Constant( const Constant & other ); 31 32 virtual ~Constant(); 33 34 virtual Constant * clone() const { return new Constant( *this ); } 32 35 33 36 Type * get_type() { return type; } … … 54 57 virtual void accept( Visitor & v ) { v.visit( this ); } 55 58 virtual Constant * acceptMutator( Mutator & m ) { return m.mutate( this ); } 56 virtual void print( std::ostream & os ) const;59 virtual void print( std::ostream & os, int indent = 0 ) const; 57 60 private: 58 61 Type * type;
Note: See TracChangeset
for help on using the changeset viewer.