Use bit vectors to store the preprocessor's state.

This commit is contained in:
Roberto Raggi
2009-10-21 16:18:34 +02:00
parent 5e00b7695c
commit 5b7a19425b
2 changed files with 5 additions and 2 deletions

View File

@@ -545,6 +545,8 @@ Preprocessor::Preprocessor(Client *client, Environment *env)
: client(client),
env(env),
_expand(env),
_skipping(MAX_LEVEL),
_true_test(MAX_LEVEL),
_result(0),
_markGeneratedTokens(false),
_expandMacros(true)

View File

@@ -54,6 +54,7 @@
#include <Token.h>
#include <QVector>
#include <QBitArray>
namespace CPlusPlus {
@@ -177,8 +178,8 @@ private:
Environment *env;
MacroExpander _expand;
bool _skipping[MAX_LEVEL]; // ### move in state
bool _true_test[MAX_LEVEL]; // ### move in state
QBitArray _skipping; // ### move in state
QBitArray _true_test; // ### move in state
int iflevel; // ### move in state
QList<State> _savedStates;