qmlweb / qmlweb-parser

A QML parser in JavaScript
Other
27 stars 11 forks source link

Drop qmlobjdef, support dot syntax in qmlprop. #19

Closed akreuzkamp closed 8 years ago

akreuzkamp commented 8 years ago

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 commented 8 years ago

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

ChALkeR commented 8 years ago

LGTM, merging.