Changes in src/SynTree/BaseSyntaxNode.h [50377a4:9857e8d]
- File:
-
- 1 edited
-
src/SynTree/BaseSyntaxNode.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/BaseSyntaxNode.h
r50377a4 r9857e8d 17 17 18 18 #include "Common/CodeLocation.h" 19 #include "Common/Indenter.h"20 19 class Visitor; 21 class Mutator;22 20 23 21 class BaseSyntaxNode { … … 27 25 virtual ~BaseSyntaxNode() {} 28 26 29 virtual BaseSyntaxNode * clone() const = 0;30 27 virtual void accept( Visitor & v ) = 0; 31 virtual BaseSyntaxNode * acceptMutator( Mutator & m ) = 0; 32 /// Notes: 33 /// * each node is responsible for indenting its children. 34 /// * Expressions should not finish with a newline, since the expression's parent has better information. 35 virtual void print( std::ostream & os, Indenter indent = {} ) const = 0; 36 void print( std::ostream & os, unsigned int indent ) { 37 print( os, Indenter{ Indenter::tabsize, indent }); 38 } 28 virtual void print( std::ostream & os, int indent = 0 ) const = 0; 39 29 }; 40 41 std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node );42 30 43 31 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.