blob: 0cc908dcf430da4cfb737d3c50c750ff39bbf3a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
/**
* @file parsing_frame_stack.h
* mainly used to handle preprocessor stuff
*
* @author Ben Gardner
* @license GPL v2+
*/
#ifndef PARSING_FRAME_STACK_H_INCLUDED
#define PARSING_FRAME_STACK_H_INCLUDED
#include "parsing_frame.h"
//! Class describing a parsing frame stack
class ParsingFrameStack
{
public:
ParsingFrameStack();
/**
* Push a copy of a ParsingFrame onto the frame stack.
*/
void push(ParsingFrame &frm);
/**
* Pop and return the top element of the frame stack.
* TODO: return the frame rather than passing it as argument
*/
void pop(ParsingFrame &pf);
// TODO: this name is dumb:
// - what is it checking?
// - why does is much more than simple checks, it allters kinds of stuff
//! Returns the pp_indent to use for this line
int check(ParsingFrame &frm, int &pp_level, Chunk *pc);
private:
std::vector<ParsingFrame> m_frames;
};
#endif /* PARSING_FRAME_STACK_H_INCLUDED */
|