Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.h

    r5809461 rd104b02  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 18 15:40:00 2017
    13 // Update Count     : 56
     12// Last Modified On : Tus Jul 25 25:30:00 2017
     13// Update Count     : 54
    1414//
    1515
     
    2121
    2222#include "Common/Indenter.h"      // for Indenter
     23
    2324#include "SynTree/Declaration.h"  // for DeclarationWithType (ptr only), Fun...
    2425#include "SynTree/Visitor.h"      // for Visitor
    2526#include "SynTree/SynTree.h"      // for Visitor Nodes
     27
     28#include "Common/Indenter.h"      // for Indenter
    2629
    2730namespace CodeGen {
     
    5962                virtual void visit( NameExpr *nameExpr );
    6063                virtual void visit( AddressExpr *addressExpr );
    61                 virtual void visit( LabelAddressExpr *addressExpr );
    6264                virtual void visit( CastExpr *castExpr );
    6365                virtual void visit( VirtualCastExpr *castExpr );
     
    111113                };
    112114
     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
    113124                void asmName( DeclarationWithType *decl );
    114125
    115126                void extension( Expression *expr );
    116127                void extension( Declaration *decl );
    117 
    118                 void updateLocation( BaseSyntaxNode const * to );
    119128          private:
    120129                Indenter indent;
     
    125134                bool genC = false;    // true if output has to be C code
    126135                bool lineMarks = false;
    127 
    128                 CodeLocation currentLocation;
    129                 void updateLocation( CodeLocation const & to );
    130                 void nextLine();
    131136
    132137                void handleStorageClass( DeclarationWithType *decl );
     
    155160        /// returns C-compatible name of declaration
    156161        std::string genName( DeclarationWithType * decl );
     162
     163        std::ostream & operator<<(std::ostream &,
     164                CodeGenerator::LineMarker const &);
    157165} // namespace CodeGen
    158166
Note: See TracChangeset for help on using the changeset viewer.