source: translator/ControlStruct/LabelGenerator.h @ b87a5ed

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since b87a5ed was d9a0e76, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

remove Parser.old, add -XCFA to driver, copy ptrdiff_t from stddef.h in preclude, remove casts from initialization constants, adjust formatting

  • Property mode set to 100644
File size: 499 bytes
RevLine 
[51b7345]1#ifndef LABEL_GENERATOR_H
2#define LABEL_GENERATOR_H
3
4#include "SynTree/SynTree.h"
5
6namespace ControlStruct {
[d9a0e76]7    class LabelGenerator {
8      public:
9        static LabelGenerator *getGenerator();
10        Label newLabel();
11        void reset() { current = 0; }
12        void rewind() { current--; }
13      protected:
14        LabelGenerator(): current(0) {}
15      private:
16        int current;
17        static LabelGenerator *labelGenerator;
18    };
[51b7345]19} // namespace ControlStruct
20
[d9a0e76]21#endif // LABEL_GENERATOR_H
[51b7345]22
23/*
24  Local Variables:
25  mode: c++
26  End:
27*/
Note: See TracBrowser for help on using the repository browser.