Ignore:
Timestamp:
May 11, 2017, 11:07:58 AM (4 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
8514fe19
Parents:
29cf9c8
Message:

Add -L flag to turn of line marks. Updated the keyword list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.h

    r29cf9c8 rc850687  
    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 );
     
    110112                };
    111113
     114                struct LineMarker {
     115                        CodeLocation const & loc;
     116                        bool toPrint;
     117
     118                        LineMarker(CodeLocation const & loc, bool toPrint);
     119                };
     120
     121                LineMarker lineDirective(BaseSyntaxNode const * node);
     122
    112123                void asmName( DeclarationWithType *decl );
    113124
     
    122133                bool pretty = false;  // pretty print
    123134                bool genC = false;    // true if output has to be C code
     135                bool lineMarks = false;
    124136
    125137                void printDesignators( std::list< Expression * > & );
     
    149161        /// returns C-compatible name of declaration
    150162        std::string genName( DeclarationWithType * decl );
     163
     164        std::ostream & operator<<(std::ostream &,
     165                CodeGenerator::LineMarker const &);
    151166} // namespace CodeGen
    152167
Note: See TracChangeset for help on using the changeset viewer.