qmlweb / qmlweb-parser

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

Error parsing property with literal object value #25

Open GTylissanakis opened 7 years ago

GTylissanakis commented 7 years ago

my qml contains the following code:

property var map: {"A": "test", "B": "test"}

and I get the following error:

Unexpected token: punc (:) (line: 22, col: 25, pos: 665)
>>22  property var map: {"A": "test", "B": "test"}
ChALkeR commented 7 years ago

Yes, I can confirm this.

It seems that objects with quoted property names should be treated as plain js objects, i.e. as wrapped in { return ... }. That doesn't work for objects with unquoted property names that way in Qt, though.