Commit 5b7a1942 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Use bit vectors to store the preprocessor's state.

parent 5e00b769
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment