Ignore:
Timestamp:
Jul 11, 2018, 11:53:09 AM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
777ed2b
Parents:
132d276
Message:

fix distribution to put type names at correct scopes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypedefTable.h

    r132d276 rfc20514  
    1010// Created On       : Sat May 16 15:24:36 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jun 22 05:29:58 2018
    13 // Update Count     : 86
     12// Last Modified On : Tue Jul 10 18:32:23 2018
     13// Update Count     : 112
    1414//
    1515
     
    2323
    2424class TypedefTable {
    25         typedef ScopedMap< std::string, int, int > KindTable;
     25        struct Note { size_t level; bool forall; };
     26        typedef ScopedMap< std::string, int, Note > KindTable;
    2627        KindTable kindTable;   
    27         unsigned int level;
     28        unsigned int level = 0;
    2829  public:
    29     TypedefTable() : kindTable{0}, level{0} {}
    3030        ~TypedefTable();
    3131
     
    3535        void addToScope( const std::string & identifier, int kind, const char * );
    3636        void addToEnclosingScope( const std::string & identifier, int kind, const char * );
     37        bool getEnclForall() { return kindTable.getNote( kindTable.currentScope() -  1 ).forall; }
    3738
    3839        void enterScope();
    3940        void leaveScope();
    4041
    41         void up() { level += 1; }
    42         void down() { level -= 1; }
     42        void up( bool );
     43        void down();
    4344
    4445        void print( void ) const;
Note: See TracChangeset for help on using the changeset viewer.