state_stack.hh 315 B

123456789101112131415161718192021
  1. #ifndef RUBY_PARSER_STATE_STACK_HH
  2. #define RUBY_PARSER_STATE_STACK_HH
  3. #include <vector>
  4. #include <memory>
  5. namespace ruby_parser {
  6. class state_stack {
  7. std::vector<bool> stack;
  8. public:
  9. void push(bool state);
  10. bool pop();
  11. void lexpop();
  12. void clear();
  13. bool active() const;
  14. };
  15. }
  16. #endif