<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/src/qml/parser/qqmljslexer.cpp, branch wip/iosstyle</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>qqmljslexer: Make lexer restartable</title>
<updated>2022-02-18T11:13:47+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2022-02-09T15:29:40+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=ae12302a9e0776fe6ecbe0b0823554223e030e6b'/>
<id>ae12302a9e0776fe6ecbe0b0823554223e030e6b</id>
<content type='text'>
Moves all variables that represent the lexers state into a separate struct
that can be read and modified from the outside. This is necessary in order
to enable per-line formatting in qmldom

Change-Id: Iedde139cec6380bd62fa12c5ddec2a943a3b50f9
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moves all variables that represent the lexers state into a separate struct
that can be read and modified from the outside. This is necessary in order
to enable per-line formatting in qmldom

Change-Id: Iedde139cec6380bd62fa12c5ddec2a943a3b50f9
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement optional chaining</title>
<updated>2021-04-13T17:19:56+00:00</updated>
<author>
<name>Maximilian Goldstein</name>
<email>max.goldstein@qt.io</email>
</author>
<published>2021-04-09T15:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=5f7ecce23321f499b1b002c32a27c63815535baa'/>
<id>5f7ecce23321f499b1b002c32a27c63815535baa</id>
<content type='text'>
This change implements optional chaining (https://github.com/tc39/proposal-optional-chaining) by adding a new type of optional lookup with an offset to the end of a chain.
If `undefined` or `null` is encountered during an access marked as optional, we jump to that end offset.

Features:
- Full support for all kinds of optional chain
- With some codegen overhead but zero overhead during normal non-optional FieldMemberExpression resolution
- Properly retains this contexts and does not need to resolve anything twice (this has been an issue previously)
- No extra AST structures, just flags for existing ones

[ChangeLog][QtQml] Added support for optional chaining (https://github.com/tc39/proposal-optional-chaining)

Fixes: QTBUG-77926
Change-Id: I9a41cdc4ca272066c79c72b9b22206498a546843
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change implements optional chaining (https://github.com/tc39/proposal-optional-chaining) by adding a new type of optional lookup with an offset to the end of a chain.
If `undefined` or `null` is encountered during an access marked as optional, we jump to that end offset.

Features:
- Full support for all kinds of optional chain
- With some codegen overhead but zero overhead during normal non-optional FieldMemberExpression resolution
- Properly retains this contexts and does not need to resolve anything twice (this has been an issue previously)
- No extra AST structures, just flags for existing ones

[ChangeLog][QtQml] Added support for optional chaining (https://github.com/tc39/proposal-optional-chaining)

Fixes: QTBUG-77926
Change-Id: I9a41cdc4ca272066c79c72b9b22206498a546843
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QQmlJSLexer: Add support for peeking one QChar</title>
<updated>2021-04-13T06:49:09+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2021-04-09T14:30:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9b4bb235cf94721662f0cb07d033d4a10489b5a4'/>
<id>9b4bb235cf94721662f0cb07d033d4a10489b5a4</id>
<content type='text'>
This is helpful for the upcoming handling of ?., which needs to be
treated as a single token (T_QUESTION_DOT), unless it is followed by a
number literal.

Change-Id: Id5e992bd037c2df88ef6e66905ec58a39bb67d73
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is helpful for the upcoming handling of ?., which needs to be
treated as a single token (T_QUESTION_DOT), unless it is followed by a
number literal.

Change-Id: Id5e992bd037c2df88ef6e66905ec58a39bb67d73
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Lexer: Drop redundant checks</title>
<updated>2021-02-18T23:14:44+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2021-02-17T13:19:25+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9f3bbbbc440517fb848633c1e10dd780b368a80f'/>
<id>9f3bbbbc440517fb848633c1e10dd780b368a80f</id>
<content type='text'>
identifierWithEscapeChars is just set to true a few lines before.

Change-Id: I6c2b1ff4146d1a606c78f21669fb3d45cfaa2de3
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
identifierWithEscapeChars is just set to true a few lines before.

Change-Id: I6c2b1ff4146d1a606c78f21669fb3d45cfaa2de3
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Uniformly support shebang</title>
<updated>2021-02-15T17:22:27+00:00</updated>
<author>
<name>Fawzi Mohamed</name>
<email>fawzi.mohamed@qt.io</email>
</author>
<published>2021-02-03T08:06:09+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6d51f997df14f2b22c265c5b2fda679ece9edef3'/>
<id>6d51f997df14f2b22c265c5b2fda679ece9edef3</id>
<content type='text'>
The "qml" tool was the only way of loading QML files that would respect
a shebang line. This is problematic as this way you cannot load such
files programatically using QQmlComponent, limiting their re-use. Common
tools like Qt Creator, but also qmllint, qmlformat, qmlcachegen, etc
would not recognize files with shebangs.

By moving she-bang support directly in the lexer all tools implicitly
support it.
Note that we could just as easily support '#' as extra comment
character along with //, but here we narrowly add support for in
the first line only, as node does (this means that javascript files
using she-bang accepted by node, are now accepted also by qml).

The only tool needing some adjustments is qmlformat, that has to emit
the she-bang again as she-bang and as first line.
Add tests for qmlformat, and sprinkle some she-bangs in the other
tests just to be sure it doesn't affect anything.

Change-Id: I1f6d881c7438bdb23163b5dbe829d59a35d11132
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "qml" tool was the only way of loading QML files that would respect
a shebang line. This is problematic as this way you cannot load such
files programatically using QQmlComponent, limiting their re-use. Common
tools like Qt Creator, but also qmllint, qmlformat, qmlcachegen, etc
would not recognize files with shebangs.

By moving she-bang support directly in the lexer all tools implicitly
support it.
Note that we could just as easily support '#' as extra comment
character along with //, but here we narrowly add support for in
the first line only, as node does (this means that javascript files
using she-bang accepted by node, are now accepted also by qml).

The only tool needing some adjustments is qmlformat, that has to emit
the she-bang again as she-bang and as first line.
Add tests for qmlformat, and sprinkle some she-bangs in the other
tests just to be sure it doesn't affect anything.

Change-Id: I1f6d881c7438bdb23163b5dbe829d59a35d11132
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qtdeclarative: finish fixing compilation with explicit QChar(int)</title>
<updated>2020-11-07T10:13:39+00:00</updated>
<author>
<name>David Faure</name>
<email>david.faure@kdab.com</email>
</author>
<published>2020-11-06T19:20:23+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=4f98bf713f6604903c4fe61adc750b23c4407a18'/>
<id>4f98bf713f6604903c4fe61adc750b23c4407a18</id>
<content type='text'>
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Idb26e2df6d4fe8940db57066a30fa8c243f6d2c9
Reviewed-by: Volker Hilsheimer &lt;volker.hilsheimer@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use qstrntod instead of qstrtod</title>
<updated>2020-08-10T05:29:25+00:00</updated>
<author>
<name>hjk</name>
<email>hjk@qt.io</email>
</author>
<published>2020-08-10T02:57:08+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2bb425bf26100971af7ec04ba4c95b9bc7dbc2e3'/>
<id>2bb425bf26100971af7ec04ba4c95b9bc7dbc2e3</id>
<content type='text'>
Potentially saves a few cycles by avoiding a strlen call.

Change-Id: I3c1e4ddf3fb0a52e9f44edea11616a8969604091
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Potentially saves a few cycles by avoiding a strlen call.

Change-Id: I3c1e4ddf3fb0a52e9f44edea11616a8969604091
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix compilation with newer qtbase</title>
<updated>2020-08-06T17:42:11+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2020-08-03T06:49:37+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=84a1cc9fb76269521456d09abab65c402cf481b7'/>
<id>84a1cc9fb76269521456d09abab65c402cf481b7</id>
<content type='text'>
qstrtod  is no longer exported, but instead an inline function. This
replaces the existing forward declarations with an include of the
required private header.

Change-Id: I50bd32557c55dddcb197f163609fd7d5a1b2301b
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qstrtod  is no longer exported, but instead an inline function. This
replaces the existing forward declarations with an include of the
required private header.

Change-Id: I50bd32557c55dddcb197f163609fd7d5a1b2301b
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Thiago Macieira &lt;thiago.macieira@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Port QtDeclarative from QStringRef to QStringView</title>
<updated>2020-06-16T20:46:16+00:00</updated>
<author>
<name>Karsten Heimrich</name>
<email>karsten.heimrich@qt.io</email>
</author>
<published>2020-06-16T08:23:19+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df'/>
<id>1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df</id>
<content type='text'>
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Timur Pocheptsov &lt;timur.pocheptsov@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: Mårten Nordheim &lt;marten.nordheim@qt.io&gt;
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Timur Pocheptsov &lt;timur.pocheptsov@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix lexer line number if code contains continuation strings</title>
<updated>2020-06-12T05:57:42+00:00</updated>
<author>
<name>Christian Stenger</name>
<email>christian.stenger@qt.io</email>
</author>
<published>2020-06-10T19:11:52+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0be8c5ae21968978ebd8e75eed10b765e002f166'/>
<id>0be8c5ae21968978ebd8e75eed10b765e002f166</id>
<content type='text'>
Follow-up lines of continuations strings that directly end
with an unescaped line feed still broke the line numbers of
code following the string. Fix by explicitly handling the
first character inside a string differently.
Amends 126ee5c901a9675a9ab61d4c6f2961c95b8bceac.

Change-Id: Ia945546d35db844114064ae34d6189704ceefe3b
Reviewed-by: Fawzi Mohamed &lt;fawzi.mohamed@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Follow-up lines of continuations strings that directly end
with an unescaped line feed still broke the line numbers of
code following the string. Fix by explicitly handling the
first character inside a string differently.
Amends 126ee5c901a9675a9ab61d4c6f2961c95b8bceac.

Change-Id: Ia945546d35db844114064ae34d6189704ceefe3b
Reviewed-by: Fawzi Mohamed &lt;fawzi.mohamed@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
