summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/BackwardsScanner.h
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-09-21 15:11:18 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2009-09-21 15:14:28 +0200
commit6c9670c3db856f8be50cf89a03eefefeeb3f6392 (patch)
tree1a42e010966629d59c27ead8bece244e75764816 /src/libs/cplusplus/BackwardsScanner.h
parentcaa164a4ab7094fa134031db1a04c1c469542f63 (diff)
downloadqt-creator-6c9670c3db856f8be50cf89a03eefefeeb3f6392.tar.gz
Use the backward scanner to indent labeled statements, ctor-initializers and access specifiers.
Diffstat (limited to 'src/libs/cplusplus/BackwardsScanner.h')
-rw-r--r--src/libs/cplusplus/BackwardsScanner.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/cplusplus/BackwardsScanner.h b/src/libs/cplusplus/BackwardsScanner.h
index 68d1f04787..1ce6d3f85c 100644
--- a/src/libs/cplusplus/BackwardsScanner.h
+++ b/src/libs/cplusplus/BackwardsScanner.h
@@ -55,17 +55,21 @@ public:
QStringRef textRef(int begin, int end) const;
// 1-based
- const SimpleToken &LA(int index) const;
+ SimpleToken LA(int index) const;
// n-la token is [startToken - n]
- const SimpleToken &operator[](int index) const; // ### deprecate
+ SimpleToken operator[](int index) const; // ### deprecate
+ int indentation(int index) const;
+
+ int startOfLine(int index) const;
int startOfMatchingBrace(int index) const;
+ int startOfBlock(int index) const;
+
int previousBlockState(const QTextBlock &block) const;
private:
const SimpleToken &fetchToken(int i);
- const QList<SimpleToken> &tokens() const;
private:
QList<SimpleToken> _tokens;