QmlJS indenter: Fix braceless switch/try/with bindings.

Change-Id: Iee25f3f9ec38b1b7fc2697f390386c9a60cb8347
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Christian Kamm
2011-12-01 15:00:29 +01:00
parent 855e4eac4f
commit 69d6a508d3
3 changed files with 169 additions and 45 deletions

View File

@@ -167,10 +167,13 @@ public: // must be public to make Q_GADGET introspection work
return_statement, // After 'return'
throw_statement, // After 'throw'
statement_with_condition, // After the 'for', 'while', 'catch', ... token
statement_with_condition, // After the 'for', 'while', ... token
statement_with_condition_paren_open, // While inside the (...)
statement_with_block, // try, finally
try_statement, // after 'try'
catch_statement, // after 'catch', nested in try_statement
finally_statement, // after 'finally', nested in try_statement
maybe_catch_or_finally, // after ther closing '}' of try_statement and catch_statement, nested in try_statement
do_statement, // after 'do'
do_statement_while_paren_open, // after '(' in while clause
@@ -278,6 +281,7 @@ protected:
bool isExpressionEndState(int type) const;
void dump() const;
QString stateToString(int type) const;
private:
void recalculateStateAfter(const QTextBlock &block);