declseq.h 349 B

123456789101112131415161718192021
  1. #ifndef DECLSEQ_H
  2. #define DECLSEQ_H
  3. #include "scope.h"
  4. struct Val;
  5. struct Decl;
  6. struct DeclSeq : public Scope{
  7. vector<Decl*> _vec;
  8. map<string,Val*> _map;
  9. void push_back( Decl *d );
  10. Val* find( string id );
  11. int size()const{ return _vec.size(); }
  12. Decl* operator[]( int n )const{ return _vec[n]; }
  13. void update( int i,Decl *d );
  14. };
  15. #endif