Skip to content

Drop qmlobjdef, support dot syntax in qmlprop. - #19

Merged
ChALkeR merged 1 commit into
masterfrom
drop-qmlobjdef-alternative
Aug 23, 2016
Merged

Drop qmlobjdef, support dot syntax in qmlprop.#19
ChALkeR merged 1 commit into
masterfrom
drop-qmlobjdef-alternative

Conversation

@akreuzkamp

Copy link
Copy Markdown
Member

qmlobjdef supported only two components, a different format was needed
to support assignments like Drag.hotSpot.x: width / 2.

Now names with dot-syntax are parsed just like they are in pure js, so
we now get nested dot-binary-expressions.

This is just for discussion for now. If we decide for this approach, I can make the unittests work :)

@ChALkeR

ChALkeR commented Jul 9, 2016

Copy link
Copy Markdown
Member

Yes, this approach in fact looks better to me.

It's only downside is that the resulted JSON tree is slightly bigger this way with no gains for the QmlWeb itself, but this better fits with what a library with a «parser» in its name should do =).

Comment thread src/api.js Outdated
function qml_is_element(str) {
return str[0].toUpperCase() == str[0];
function qml_is_element(name) {
if (typeof name == "string") {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: ===

@akreuzkamp
akreuzkamp force-pushed the drop-qmlobjdef-alternative branch from 86e647c to 084743d Compare July 9, 2016 12:36
qmlobjdef supported only two components, a different format was needed
to support assignments like Drag.hotSpot.x: width / 2.

Now names with dot-syntax are parsed just like they are in pure js, so
we now get nested dot-binary-expressions.
@ChALkeR

ChALkeR commented Aug 23, 2016

Copy link
Copy Markdown
Member

LGTM, merging.

@ChALkeR
ChALkeR merged commit 6e5bf1c into master Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants