Ignore:
Timestamp:
Nov 22, 2014, 4:51:46 PM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
d11f789
Parents:
3c70d38
Message:

formatting changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • translator/SymTab/StackTable.h

    r3c70d38 rea3eb06  
    1 /*
    2  * This file is part of the Cforall project
    3  *
    4  * $Id: StackTable.h,v 1.2 2002/09/19 21:02:44 rcbilson Exp $
    5  *
    6  */
    7 
    81#ifndef SYMTAB_STACKTABLE_H
    92#define SYMTAB_STACKTABLE_H
     
    158
    169namespace SymTab {
     10    template< typename Element, typename ConflictFunction >
     11        class StackTable {
     12      public:
     13        StackTable();
    1714
    18 template< typename Element, typename ConflictFunction >
    19 class StackTable
    20 {
    21 public:
    22   StackTable();
     15        void enterScope();
     16        void leaveScope();
     17        void add( Element *type );
     18        void add( std::string fwdDeclName );
     19        Element *lookup( std::string id ) const;
    2320
    24   void enterScope();
    25   void leaveScope();
    26   void add( Element *type );
    27   void add( std::string fwdDeclName );
    28   Element *lookup( std::string id ) const;
    29 
    30   void dump( std::ostream &os ) const; // debugging
     21        void dump( std::ostream &os ) const; // debugging
     22      private:
     23        typedef std::pair< Element*, int > Entry;
     24        typedef std::map< std::string, std::stack< Entry > > TableType;
    3125 
    32 private:
    33   typedef std::pair< Element*, int > Entry;
    34   typedef std::map< std::string, std::stack< Entry > > TableType;
    35  
    36   ConflictFunction conflictFunction;
    37   TableType table;
    38   int scopeLevel;
    39 };
    40 
    41 } // namespace SymTab
     26        ConflictFunction conflictFunction;
     27        TableType table;
     28        int scopeLevel;
     29    };
     30} // SymTab
    4231
    4332#include "StackTable.cc"
    4433
    45 #endif /* #ifndef SYMTAB_STACKTABLE_H */
     34#endif // SYMTAB_STACKTABLE_H
Note: See TracChangeset for help on using the changeset viewer.