There is also a new script to verify completeness of .gitattributes:
releng/scripts/verify_gitattributes.sh
Change-Id: I2ce270852ab54b66b6c474a6ec94203fe5bba78b
Added several classes that can be used to aggregate all of the
information from within a .qmltypes file as defined by
http://doc.qt.io/qt-5/qtqml-modules-qmldir.html#writing-a-qmltypes-file
Change-Id: Ia36c3bb1a4a0254c4125733d6faabbb5a4606133
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Added the class QmlASTNodeHandler that creates and manages Proxy
instances of the QML AST node interfaces. The proxies are created
dynamically based on what methods are called on the interface. That
way, the AST is loaded as needed rather than all at once. Added a few
tests to verify behavior (however, they are not comprehensive; there are
a lot more cases that should be verified in the future).
Change-Id: I64038f9668942a67e1f1b7dceac6c7dbed2d46d7
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Created a set of Interfaces to represent the JavaScript and QML Ast in
plain Java. Updated acorn-qml to be able to parse the entirety of QML
syntax as specified by the QML grammar. Also modified the QML AST to
represent the added syntax and modified tern-qml to handle the new AST
elements.
Changed the way that the QMLAnalyzer handles path resolution. Paths are
now relative to the local file system.
Note: the normal acorn-qml parser cannot parse the full range of QML
syntax due to ambiguities. However, the loose parser can. We're still
waiting on Acorn to bring lookahead to the normal parser in order to
resolve this.
Change-Id: I77c820ad46301975b2a91969a656d428ad9409c1
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Added the 'mode' option to acorn-qml that, when set to "qmltypes", will
allow it to parse the slightly different syntax that qmltypes files
have. Added a few tests to check this functionality.
Change-Id: Ica240c33ad9a153953f099845cdcb71e241c3a8d
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Added two new query types to tern-qml: 'parseFile' and 'parseString'
which will return an AST for the given file or string respectively.
Change-Id: I4608866c002d43defb4d462c4a981282ed97e1c6
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Hooked up the extra logic needed to get Tern-QML's imports to work in
the QML File Editor.
Change-Id: I6fa222223ca8b6b177e4004e48f2f1863ab4d7b4
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Added functionality to tern-qml that allows it to recognize directory
imports of the form: import "<directory>" [as <Qualifier>]. Content
assist and find definitions also work for these new imports. Moreover,
fixed the QML Scoping to be easier to handle in the future by defining
new Scope Objects specifically for QML. Finally, used JS Hint and
Beautify to have a more uniform coding style between all the files of
acorn-qml and tern-qml.
Also fixed up the HTML Demo to allow editing of multiple files to show
the new imports.
Change-Id: I2cdd18b1b8765400f6b24145f0677127a221fe10
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Fixed the following issues with QML:
-The parent scope of a QML Object is the file's root Object scope
-Content assist for an Object Property should only display the
immediate Object's properties, not it's parent(s)
-Content assist for an incomplete property binding should display
JavaScript hints as well
Added missing license headers and new tests. Had to modify the
acorn-qml parser plugin in order to make some of the changes. Added
tests for those as well.
Change-Id: I289167cbaacd8088f87dfafc689e67c0110d942f
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Added a testing framework similar to acorn-qml's for tern-qml and began
adding tests. Updated acorn-qml and tern-qml to use acorn v2.6.4 which
includes the changes to acorn_loose that enable loose parser plugins.
Change-Id: Ib6af4b476321fde4b3f15aac8342764a45985dfa
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Tern can now perform static analysis on the following QML constructs:
- QML Property Declarations
- QML Property Bindings
- QML Signals
- QML Signal Handlers
Added basic support for the 'id' property that can be assigned to any
QML Object. Fixed acorn-qml's member function parsing and added tests.
The 'demo' folder contains an html demo of the qml tern implementation
using codemirror as the editor.
Change-Id: I9e4d3837b194ff92a36a8d62bef288f61743e4ce
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>
Moved the Tern.js work and acorn-qml into the Qt Core plugin rather than
in a separate plugin. Added walk.js in order to facilitate walking the
QML AST by acorn-qml. Changed a few things in index.js and inject.js
for acorn-qml in order to get it working in a browser environment.
Added a tern-qml webpage demo which doesn't do much for now.
Change-Id: I3c8a3d57c98a4936d0e038774b410bb2a68afb6c
Signed-off-by: Matthew Bastien <mbastien@blackberry.com>