diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-05-29 11:20:11 (GMT) |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-05-29 11:20:11 (GMT) |
commit | fd255177af9d946e271d67000d3867b72cb5c682 (patch) | |
tree | fbd0e06f35122d6ded1b06897103179028e920d2 /src/declarative/qml/qmlscriptparser.cpp | |
parent | 80518af09b464c88dfd419fa6087cffc1dc914b5 (diff) | |
download | Qt-fd255177af9d946e271d67000d3867b72cb5c682.zip Qt-fd255177af9d946e271d67000d3867b72cb5c682.tar.gz Qt-fd255177af9d946e271d67000d3867b72cb5c682.tar.bz2 |
Added range information for lists which contains the position and length
from the open bracket upto the close bracket.
Diffstat (limited to 'src/declarative/qml/qmlscriptparser.cpp')
-rw-r--r-- | src/declarative/qml/qmlscriptparser.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp index 75c81a7..31a20be 100644 --- a/src/declarative/qml/qmlscriptparser.cpp +++ b/src/declarative/qml/qmlscriptparser.cpp @@ -651,6 +651,11 @@ bool ProcessAST::visit(AST::UiArrayBinding *node) accept(node->members); + // For the DOM, store the position of the T_LBRACKET upto the T_RBRACKET as the range: + Property* prop = currentProperty(); + prop->listValueRange.offset = node->lbracketToken.offset; + prop->listValueRange.length = node->rbracketToken.offset + node->rbracketToken.length - node->lbracketToken.offset; + while (propertyCount--) _stateStack.pop(); |