aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/parser
Commit message (Collapse)AuthorAgeFilesLines
* Fix processing of unary T_MINUS_MINUS tokens after semicolon insertion.Roberto Raggi2011-09-211-1/+1
| | | | | | | | | | There was a typo in the code, instead of pushing a T_MINUS_MINUS token the lexer synthesized a T_PLUS_PLUS. Change-Id: I62dcf263ac363196231fe8f02e98f280899ef85a Reviewed-on: http://codereview.qt-project.org/5293 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* Move JS RegExp flag definitions to header fileKent Hansen2011-09-192-11/+11
| | | | | | | | | | This way they can be used by tools that use the lexer (e.g. qml minifier). Change-Id: I226d1712089b01defd3b45ccb99db596955bff8b Reviewed-on: http://codereview.qt-project.org/4762 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Fix typo when recognizing escape charactersRoberto Raggi2011-09-191-1/+1
| | | | | | | Change-Id: Id97d5c12d271794fb9c7c752fd6535af90883eb4 Reviewed-on: http://codereview.qt-project.org/4770 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add the method tokenKind() to the QML/JS lexer.Roberto Raggi2011-09-192-0/+6
| | | | | | | | | The method returns the last token recognized by the lexer. Change-Id: I9464e96c1276852737ddc8330d08d57326b48888 Reviewed-on: http://codereview.qt-project.org/5015 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add support for QML/JS pragma directives.Roberto Raggi2011-09-192-0/+119
| | | | | | | | | | | | | The lexer can now recognize the following pragma directives: .pragma library .import <URI> <Version> as <Identifier> .import <file.js> as <Identifier> Change-Id: I2c44140818f356419640266a46b5e172474819ee Reviewed-on: http://codereview.qt-project.org/4897 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix automatic semicolon insertion.Roberto Raggi2011-09-194-18/+23
| | | | | | | | | | The parser should insert a T_SEMICOLON token when it reaches an error state and the lookahead token is following a closing brace. Change-Id: Ib849e7fbfe50c2a3e679ae0794f5780cc0b94de5 Reviewed-on: http://codereview.qt-project.org/4896 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix compile when the parser is included in non GUI applications.Roberto Raggi2011-09-191-1/+1
| | | | | | | Change-Id: I63d910f0f63cd88d919b5487d5b48f6019eca9bd Reviewed-on: http://codereview.qt-project.org/4895 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix the implementation of Lexer::tokenText().Roberto Raggi2011-09-192-7/+11
| | | | | | | | | | Lexer::tokenText() should return the contents of the string literal without the quotes. Change-Id: I968ca2e5142d8c55c75990c24380d2faa9b313a3 Reviewed-on: http://codereview.qt-project.org/4440 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Introduced a QML scanning mode.Roberto Raggi2011-09-193-32/+35
| | | | | | | | | | In QML mode, the lexer will recognize the extra QML keywords, e.g. readonly, as, on, and so on. Change-Id: I148ff857e201f99d41e0265bcfc480a94a1085a0 Reviewed-on: http://codereview.qt-project.org/4518 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Get rid of QDeclarativeUtilsKent Hansen2011-09-191-19/+18
| | | | | | | | | | | All the QChar methods needed by QtDeclarative have now been optimized to achieve at least as good performance as the QDeclarativeUtils versions. Change-Id: I5b8dd58f9b597f716b53563d07d39d894c5dd666 Reviewed-on: http://codereview.qt-project.org/5059 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove some unused includes.Jędrzej Nowacki2011-09-151-1/+1
| | | | | | | Change-Id: I5090b0d3c88f3c972b1f1d2a56a954138f8d02ca Reviewed-on: http://codereview.qt-project.org/4283 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove the remaining dependencies onto QtWidgetsLars Knoll2011-09-011-1/+1
| | | | | | Change-Id: I49efc4d0af4c19c24515ecfaa5c549e36f442cc8 Reviewed-on: http://codereview.qt.nokia.com/3992 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Merge branch 'master' into refactorGunnar Sletta2011-08-3114-2745/+2969
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/v8 src/declarative/declarative.pro src/declarative/items/qsgcanvas.cpp src/declarative/items/qsgshadereffectsource_p.h src/declarative/items/qsgview.cpp src/declarative/particles/qsgcustomparticle.cpp src/imports/gestures/gestures.pro src/imports/particles/particles.pro src/plugins/qmltooling/qmldbg_inspector/qmldbg_inspector.pro src/qtquick1/qtquick1.pro tests/auto/declarative/examples/examples.pro tests/auto/declarative/qsglistview/qsglistview.pro tests/auto/qtquick1/qdeclarativeviewer/qdeclarativeviewer.pro Change-Id: I423344f83e1835116cad531b877fde6e68a8849a
| * Collect the source locations of the single and multiline comments.Roberto Raggi2011-08-301-0/+10
| | | | | | | | | | | | | | Change-Id: I7a8f2eec7a45f7a9a1212680f477cc5edd2aaad5 Reviewed-on: http://codereview.qt.nokia.com/3796 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Fix the source location of the T_ELSE token.Roberto Raggi2011-08-302-2/+2
| | | | | | | | | | | | | | Change-Id: I9cb9effad495ae7b20a56c5a8943efbeae95c179 Reviewed-on: http://codereview.qt.nokia.com/3789 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Fix parsing of numeric literals.Roberto Raggi2011-08-301-1/+1
| | | | | | | | | | | | | | | | | | Store the value in a double. Change-Id: I17b90d2917a2710d434a92b5f6b297f755156c31 Reviewed-on: http://codereview.qt.nokia.com/3788 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Fix the computation of the start token position.Roberto Raggi2011-08-301-3/+5
| | | | | | | | | | | | | | | | Rewind the buffer pointer only when necessary. Change-Id: Idd78edc068b1c55d79c5674facd9c55270e536a8 Reviewed-on: http://codereview.qt.nokia.com/3787 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Recompute the token length after the scan of a regexp.Roberto Raggi2011-08-301-0/+2
| | | | | | | | | | | | | | Change-Id: I9042f261b374bee1a3f9cb8d2dc40e381a66732b Reviewed-on: http://codereview.qt.nokia.com/3781 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Fix possible crash when using the QML lexer without an engine.Roberto Raggi2011-08-301-8/+10
| | | | | | | | | | | | | | Change-Id: Ia7d820cf1a63eaf42041ab78e1f111d31358e4dd Reviewed-on: http://codereview.qt.nokia.com/3779 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Remove deprecated QChar to ushort conversions.Roberto Raggi2011-08-301-5/+5
| | | | | | | | | | | | | | Change-Id: I2411d2221e70685d1a1518e2f5eb2e693261e00d Reviewed-on: http://codereview.qt.nokia.com/3775 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Special case integers and strings in lexerAaron Kennedy2011-08-301-1/+37
| | | | | | | | | | | | | | | | | | Reduces the amount of copying for integer numbers and uses a raw QStringRef for unescaped strings. Change-Id: I2ad29f4c67be72495e3209081761b9a1bb503f26 Reviewed-on: http://codereview.qt.nokia.com/3773 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Inline a couple of often used methods.Martin Jones2011-08-303-5/+2
| | | | | | | | | | | | | | Change-Id: I6fdcebd45835e7700fc470790a259e256fa68066 Reviewed-on: http://codereview.qt.nokia.com/3762 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Change the V4 IR so it can be stored in a memory pool.Roberto Raggi2011-08-301-42/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That is, remove members with a non-trivial destructor from IR::Stmt and IR::Expr (that's because we don't destroy the objects allocated in the pool). Added the method MemoryPool::reset() so we can clear the pool without disposing the allocated memory. Change-Id: I126332be387c016578c086db8b3aa8098b2507f6 Reviewed-on: http://codereview.qt.nokia.com/3758 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Removed QDeclarativeJS::NodePoolRoberto Raggi2011-08-3010-548/+404
| | | | | | | | | | | | | | Change-Id: I69d39ef005900803f6c620ea8f1ca00d054dc8d2 Reviewed-on: http://codereview.qt.nokia.com/3757 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Some lexer improvement, mostly by avoiding QChar::isWhatever()Martin Jones2011-08-301-47/+53
| | | | | | | | | | | | | | Change-Id: I330a45a2f611a594d9b0e9bb24ebef028654a8d8 Reviewed-on: http://codereview.qt.nokia.com/3756 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Improved parsing of numeric literalsRoberto Raggi2011-08-303-31/+85
| | | | | | | | | | | | | | Change-Id: Id02b5b0b0ab590b7ea5d20098472459e1fd986a6 Reviewed-on: http://codereview.qt.nokia.com/3755 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
| * Improve performance of the QML front-endAaron Kennedy2011-08-3012-2232/+2464
| | | | | | | | | | | | | | | | | | | | | | Introduced a new lexer and a more efficient representation of the AST. Instead of creating unique name ids, we simply use QStringRef(s). Change-Id: I403472fa2bb74d2c87dd6314065306499677a3bf Authored-by: Roberto Raggi Reviewed-on: http://codereview.qt.nokia.com/3750 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Use memory more conservatively during QML compilationAaron Kennedy2011-08-301-1/+1
| | | | | | | | | | | | Change-Id: I63af79e575345bce00d724f1e7c87606156d1479 Reviewed-on: http://codereview.qt.nokia.com/3744 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* | Build against refactor.Samuel Rødal2011-07-291-1/+1
|/ | | | Change-Id: I0143767405afe968c0aea71651bd9e3dc7a74e23
* Fix UiPublicMember::lastSourceLocation.Christian Kamm2011-06-291-0/+2
| | | | | | | Change-Id: Ia2c13bf250b0b0e3d87ff7bd64a3bead1c26c1f0 Reviewed-on: http://codereview.qt.nokia.com/755 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Merge branch 'qtquick2'Martin Jones2011-05-3117-1026/+1031
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/declarative/flickr/common/Progress.qml demos/declarative/flickr/common/RssModel.qml demos/declarative/flickr/common/ScrollBar.qml demos/declarative/flickr/common/Slider.qml demos/declarative/flickr/mobile/Button.qml demos/declarative/flickr/mobile/GridDelegate.qml demos/declarative/flickr/mobile/ImageDetails.qml demos/declarative/flickr/mobile/ListDelegate.qml demos/declarative/flickr/mobile/TitleBar.qml demos/declarative/flickr/mobile/ToolBar.qml demos/declarative/webbrowser/content/Button.qml demos/declarative/webbrowser/content/FlickableWebView.qml demos/declarative/webbrowser/content/Header.qml demos/declarative/webbrowser/content/ScrollBar.qml demos/declarative/webbrowser/content/UrlInput.qml demos/declarative/webbrowser/webbrowser.qml doc/src/snippets/declarative/mousearea/mousearea-snippet.qml examples/declarative/modelviews/webview/newwindows/qml/alerts.html examples/declarative/modelviews/webview/newwindows/qml/content/Mapping/map.html examples/declarative/modelviews/webview/newwindows/qml/content/pics/cancel.png examples/declarative/modelviews/webview/newwindows/qml/content/pics/ok.png examples/declarative/modelviews/webview/newwindows/qml/newwindows.html src/declarative/graphicsitems/qdeclarativetextinput.cpp src/declarative/qml/qdeclarativecompiledbindings.cpp src/declarative/qml/qdeclarativecompiledbindings_p.h src/declarative/qml/qdeclarativedom.cpp src/declarative/qml/qdeclarativedom_p.h src/declarative/qml/qdeclarativedom_p_p.h src/declarative/qml/qdeclarativeengine.cpp src/declarative/qml/qdeclarativetypeloader.cpp src/imports/particles/particles.cpp tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png tests/auto/declarative/qmlvisual/qdeclarativepositioners/data/usingRepeater.0.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.0.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.1.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.2.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.3.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.4.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.5.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.6.png tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data/follow.7.png tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/multilineAlign.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-X11/multilineAlign.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/baseline/data-X11/parentanchor.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/data-MAC/qtbug_14865.1.png tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/data-X11/qtbug_14865.1.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide.1.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/elide2.1.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.1.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.2.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.3.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.4.png tests/auto/declarative/qmlvisual/qdeclarativetext/elide/data-X11/multilength.5.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext2.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-MAC/plaintext3.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/plaintext2.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext.0.png tests/auto/declarative/qmlvisual/qdeclarativetext/font/data-X11/richtext2.0.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.0.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.1.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.10.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.11.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.2.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.3.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.4.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.5.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.6.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.7.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.8.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/usingMultilineEdit.9.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.0.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.1.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.2.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.3.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.4.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.5.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/wrap.6.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.0.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.1.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.2.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.3.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/qt-669.4.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.10.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.11.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.12.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.7.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/usingMultilineEdit.9.png tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/wrap.7.png tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.0.png tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.1.png tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-MAC/echoMode.2.png tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/usingLineEdit.11.png tests/auto/declarative/qmlvisual/tst_qmlvisual.cpp Change-Id: I40df8a9403a58a6c03a0f1734f16a5cbed6c85ff
| * Fix the QML front-end to allow side effects in the initializer.Roberto Raggi2011-05-127-986/+991
| | | | | | | | Task-number: QTBUG-15117
| * Fix wrong usages of #include directives in the QML/JS parser.Roberto Raggi2011-05-0914-39/+39
| | | | | | | | Reviewed-by: Aaron Kennedy
| * Compilation benchmarkAaron Kennedy2011-05-051-1/+1
| | | | | | | | Change-Id: Iaa875817367d3a9600dd1ad685f996377af9f82d
* | Update licenseheader text in source files for qtdeclarative Qt moduleJyri Tahtela2011-05-2417-307/+307
|/ | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2718-0/+12825
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12