Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop qmlobjdef, support dot syntax in qmlprop. #19

Merged
merged 1 commit into from
Aug 23, 2016

Conversation

akreuzkamp
Copy link
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
Copy link
Member

ChALkeR commented Jul 9, 2016

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 =).

function qml_is_element(str) {
return str[0].toUpperCase() == str[0];
function qml_is_element(name) {
if (typeof name == "string") {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: ===

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
Copy link
Member

ChALkeR commented Aug 23, 2016

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.

None yet

2 participants