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>