diff options
author | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-06-10 10:02:29 (GMT) |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@nokia.com> | 2009-06-10 10:02:29 (GMT) |
commit | c0bbe44ab6290dee088138c01724779026d2c033 (patch) | |
tree | f6344fcf5fc9cd5fe58754afbac3c68c3438d33a /src/declarative/qml/qmldom.cpp | |
parent | bf750d1df7e1474ffddc547205f7f20520559ea7 (diff) | |
download | Qt-c0bbe44ab6290dee088138c01724779026d2c033.zip Qt-c0bbe44ab6290dee088138c01724779026d2c033.tar.gz Qt-c0bbe44ab6290dee088138c01724779026d2c033.tar.bz2 |
Changed the QML parser and the AST to store the position of comma tokens
of QML arrays. Also exposed these positions through the QML DOM.
Diffstat (limited to 'src/declarative/qml/qmldom.cpp')
-rw-r--r-- | src/declarative/qml/qmldom.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/qml/qmldom.cpp b/src/declarative/qml/qmldom.cpp index e06afb5..d2608c8 100644 --- a/src/declarative/qml/qmldom.cpp +++ b/src/declarative/qml/qmldom.cpp @@ -1449,6 +1449,16 @@ int QmlDomList::length() const return 0; } +/*! + Returns a list of positions of the commas in the QML file. +*/ +QList<int> QmlDomList:: commaPositions() const +{ + if (d && d->property) + return d->property->listCommaPositions; + else + return QList<int>(); +} /*! \class QmlDomComponent |