Changes in src/CodeGen/CodeGenerator.h [0dd18fd:d104b02]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.h
r0dd18fd rd104b02 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Aug 18 15:40:00 201713 // Update Count : 5 612 // Last Modified On : Tus Jul 25 25:30:00 2017 13 // Update Count : 54 14 14 // 15 15 … … 21 21 22 22 #include "Common/Indenter.h" // for Indenter 23 23 24 #include "SynTree/Declaration.h" // for DeclarationWithType (ptr only), Fun... 24 25 #include "SynTree/Visitor.h" // for Visitor 25 26 #include "SynTree/SynTree.h" // for Visitor Nodes 27 28 #include "Common/Indenter.h" // for Indenter 26 29 27 30 namespace CodeGen { … … 74 77 virtual void visit( CommaExpr *commaExpr ); 75 78 virtual void visit( CompoundLiteralExpr *compLitExpr ); 79 virtual void visit( UniqueExpr * ); 80 virtual void visit( TupleAssignExpr * tupleExpr ); 76 81 virtual void visit( UntypedTupleExpr *tupleExpr ); 77 82 virtual void visit( TupleExpr *tupleExpr ); … … 108 113 }; 109 114 115 struct LineMarker { 116 CodeLocation const & loc; 117 bool toPrint; 118 119 LineMarker(CodeLocation const & loc, bool toPrint); 120 }; 121 122 LineMarker lineDirective(BaseSyntaxNode const * node); 123 110 124 void asmName( DeclarationWithType *decl ); 111 125 112 126 void extension( Expression *expr ); 113 127 void extension( Declaration *decl ); 114 115 void updateLocation( BaseSyntaxNode const * to );116 128 private: 117 129 Indenter indent; … … 122 134 bool genC = false; // true if output has to be C code 123 135 bool lineMarks = false; 124 125 CodeLocation currentLocation;126 void updateLocation( CodeLocation const & to );127 void nextLine();128 136 129 137 void handleStorageClass( DeclarationWithType *decl ); … … 152 160 /// returns C-compatible name of declaration 153 161 std::string genName( DeclarationWithType * decl ); 162 163 std::ostream & operator<<(std::ostream &, 164 CodeGenerator::LineMarker const &); 154 165 } // namespace CodeGen 155 166
Note: See TracChangeset
for help on using the changeset viewer.