Improve if condition splitting.

Done-with: ckamm
This commit is contained in:
Roberto Raggi
2009-11-19 17:06:44 +01:00
parent f09cb01f46
commit eec54d4089
2 changed files with 105 additions and 31 deletions

View File

@@ -63,6 +63,7 @@ public:
virtual QString description() const = 0;
virtual void apply() = 0;
virtual int match(const QList<CPlusPlus::AST *> &path, QTextCursor tc) = 0;
CPlusPlus::Document::Ptr document() const { return _doc; }
CPlusPlus::Snapshot snapshot() const { return _snapshot; }
@@ -80,6 +81,8 @@ protected:
int endOf(unsigned index) const;
int endOf(const CPlusPlus::AST *ast) const;
bool contains(unsigned tokenIndex) const;
void move(int start, int end, int to);
void move(unsigned tokenIndex, int to);
void move(const CPlusPlus::AST *ast, int to);