| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4script.cpp
src/qml/parser/qqmljslexer.cpp
Change-Id: I82252a8c504a4b77c45f4f8efe849ff9acb949fd
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-71812
Change-Id: I93b99496a7572c0f5128c69b865bb2b4f87d29af
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|/
|
|
|
|
|
|
| |
This is required to properly implement support for tagged templates
and String.raw.
Change-Id: Id548f97dd8ebfb7206abb55967f979c3fa6f6eea
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Move properties from RegExpObject to getters in RegExp.prototype
to be compliant with the JS spec.
Implement support for the sticky flags ('y') and correctly parse
the flags in the RegExp constructor.
Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Add support for the 'u' flag for regular expressions.
Change-Id: I409054eaa9c50183619752d14f2638f5a38c0ea7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Always parse 'import' as a keyword, as it is now one in Qml and ES.
* Always parse 'as' as keyword but allow it as identifier using the same
trick as for the other keywords.
This fixes basic import statements such as import "foo.mjs" as bar but
still allows funny variations such as import "foo.mjs" as as.
Change-Id: I76a600aab90c1b5c07d079bf11b0a78742d44c53
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-67476
Change-Id: Ia8c6863ad35c8a92298e5dffd750d17628200573
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The support is basically at the same level as for for-in
at the moment.
Currently unimplemented:
* Destructuring
* Proper lexical scoping
* calling iterator.throw()/return() when required
Change-Id: If193ce0b054c4315fc16b7e174334a31b2730dcf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Some smaller changes to the codegen are included as well to ensure
that we catch all uses of generators and properly throw an unimplemented
error on them for now.
Change-Id: Ib915a0e862e128644ff00dfe989507783c912c66
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
In some valid cases, the lexer would add an automatic semicolon
before the ++/-- operators even if it shouldn't.
Change-Id: I2935259fd98a4c7f3f929cc1cecea85f7dde8016
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I58a21e70fdd040175b52465d6ba52e7fceaf6398
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ib228925db9285e61acebc79f881acfbc2de9ff16
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not a keyword outside of generator functions, so extend the
qmlmode boolean on the lexer to become a more general parsemode that
we can use to also turn the yield keyword on and of.
The parser can then set the flag when it enters the body of a generator
function.
Change-Id: Ibf792d4c7c567d825c6706f7b4997362c87fc575
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
The parser can also handle rest parameters correctly, this will
however require some additional work in the runtime to support
it correctly.
Change-Id: Ib6f4d27683774966b2d2aac075494d2f5066d2a2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This requires a bit of bookeeping in the lexer, as we can have
arbitrary expressions inside the ${...}. To make this work, keep
a stack of template states, in which we count the unclosed braces
to match up with the correct closing brace.
Implements support for `...`. Expressions of the type Foo`...`
and Foo()`...` will come in follow-up commits.
Change-Id: Ia332796cfb77895583d0093732e6f56c8b0662c9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
The usage of it was removed in b555f45c10a050be9410f9dc6286a44753cc7d98.
Change-Id: I3b28f32e1d2f4fbd7c16fb0251888cf10507578f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4internalclass.cpp
src/qml/parser/qqmljslexer.cpp
src/qml/qml/v8/qv8engine.cpp
src/qml/util/qqmladaptormodel_p.h
src/quick/items/qquickanimatedsprite.cpp
tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
Change-Id: I16702b7a0da29c2a332afee47728d6a6ebf4fb3f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the identifier contains characters outside the Unicode
BMP, we need to correctly decode them from surrogate pairs
or unicode escape sequences before testing whether they are
valid characters for an identifier.
Change-Id: I5d6ceaf27a353d3a708da86f08cfb9796eb8b1d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ECMAScript 6 added the \u{XXXX} syntax to encode arbitrary
Unicode code points. Support this properly in our lexer.
One issue currently is that codepoints outside the BMP will
not yet be handled correctly.
Change-Id: Id46f9ec6fdbb264a5a919d84a16857afc9e8ca6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I69b9b9308b278ab50207e355467bf3db4b8ccbc9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
In line with Chapter 11.8.3 of ECMAScript 6.
Change-Id: I3c67e001858eb8f055ec49f83ec51a1bf9c8154b
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|/
|
|
|
| |
Change-Id: I7e6245fb064d071518e0d46d1cc56e516d230abc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Silence g++ 7.X warnings.
Change-Id: Iba80ab547111d883ff8b3e99173cc5f3a79ae81f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
| |
Change-Id: Iea5f8ca269bb759c615c4768d63a7c09ec9975fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I8a725018a5aeb39df370f856cd77d887faa511e3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
There's a scanner in QQmlJS::Lexer::scanDirectives that can parse those, so
let's get rid of extra parser that operates on a string. Instead this way we
can do the scanning all in one shot, avoid detaching a copy of the source code
string and (most importantly) bring the parser closer to the copy in Qt
Creator, which uses the directives approach to extract imports and pragma.
Change-Id: Iff6eb8d91a45d8a70f383f953115692be48259de
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
This shaved the time of this function in half on an (admittedly very morbid)
testcase of mine, from 161ms to 72ms total.
Change-Id: I88ad8d4ad4791dc4e7eadb9af9265ff02fe5376f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
| |
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Avoid empty statements after else.
Change-Id: Ia7782a3371bc79c7e93857aa252309d2824a5a9e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
Change-Id: I5e5684f5b98b00f791ade99c4cb6bc2ed880ad6a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|