Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.h

    r5f642e38 ra28bc02  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar  1 16:20:04 2017
    13 // Update Count     : 50
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed May 10 10:57:00 2017
     13// Update Count     : 51
    1414//
    1515
     
    2525#include "SymTab/Indexer.h"
    2626
     27#include "Common/utility.h"
     28
    2729namespace CodeGen {
    2830        class CodeGenerator : public Visitor {
     
    3032                static int tabsize;
    3133
    32                 CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false );
     34                CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false, bool lineMarks = false );
    3335                CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false );
    3436                CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false );
     
    7476                virtual void visit( UntypedTupleExpr *tupleExpr );
    7577                virtual void visit( TupleExpr *tupleExpr );
     78                virtual void visit( TupleIndexExpr * tupleExpr );
    7679                virtual void visit( TypeExpr *typeExpr );
    7780                virtual void visit( AsmExpr * );
     
    110113                };
    111114
     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
    112124                void asmName( DeclarationWithType *decl );
    113125
     
    122134                bool pretty = false;  // pretty print
    123135                bool genC = false;    // true if output has to be C code
     136                bool lineMarks = false;
    124137
    125138                void printDesignators( std::list< Expression * > & );
     
    149162        /// returns C-compatible name of declaration
    150163        std::string genName( DeclarationWithType * decl );
     164
     165        std::ostream & operator<<(std::ostream &,
     166                CodeGenerator::LineMarker const &);
    151167} // namespace CodeGen
    152168
Note: See TracChangeset for help on using the changeset viewer.