Skip to content

Commit

Permalink
Extend the grammar of QML binding declarations.
Browse files Browse the repository at this point in the history
This allows the use of non-iterative statements
on the right hand side of a binding declaration.

Change-Id: I60fac880766ba99a410b3647e41b1252677a372f
Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
  • Loading branch information
Roberto Raggi authored and Qt by Nokia committed Nov 30, 2011
1 parent 92b2a05 commit dcf1e55
Show file tree
Hide file tree
Showing 12 changed files with 1,094 additions and 946 deletions.
5 changes: 4 additions & 1 deletion src/declarative/qml/parser/qdeclarativejs.g
Expand Up @@ -790,7 +790,10 @@ case $rule_number: {
UiScriptStatement: Block ;
UiScriptStatement: EmptyStatement ;
UiScriptStatement: ExpressionStatement ;
UiScriptStatement: IfStatement ; --- ### do we really want if statement in a binding?
UiScriptStatement: IfStatement ;
UiScriptStatement: WithStatement ;
UiScriptStatement: SwitchStatement ;
UiScriptStatement: TryStatement ;

UiObjectMember: UiQualifiedId T_COLON UiScriptStatement ;
/.
Expand Down
1,476 changes: 737 additions & 739 deletions src/declarative/qml/parser/qdeclarativejsgrammar.cpp

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/declarative/qml/parser/qdeclarativejsgrammar_p.h
Expand Up @@ -165,15 +165,15 @@ class QDeclarativeJSGrammar
T_XOR = 79,
T_XOR_EQ = 80,

ACCEPT_STATE = 640,
RULE_COUNT = 345,
STATE_COUNT = 641,
ACCEPT_STATE = 643,
RULE_COUNT = 348,
STATE_COUNT = 644,
TERMINAL_COUNT = 102,
NON_TERMINAL_COUNT = 107,

GOTO_INDEX_OFFSET = 641,
GOTO_INFO_OFFSET = 2818,
GOTO_CHECK_OFFSET = 2818
GOTO_INDEX_OFFSET = 644,
GOTO_INFO_OFFSET = 2806,
GOTO_CHECK_OFFSET = 2806
};

static const char *const spell [];
Expand Down

0 comments on commit dcf1e55

Please sign in to comment.