Closed grassator closed 2 years ago
This is invalid QML syntax. Object literal in a binding position without (parenthesis) will be parsed as a code block. Thus, sdf
becomes a label (for goto
), "sdfs", sdfg
is an expression with binary comma operator (which evaluates and discards left-hand-side value), and after that is an unparsable mess (colon :
).
❯ qml source.qml
QQmlApplicationEngine failed to load component
file:///home/ratijas/tmp/source.qml:2:43: Expected token `,'
qml: Did not load any objects, exiting.
Anyway, proper JavaScript code blocks and expressions are implemented in https://github.com/ratijas/Sublime-QML/commit/89b0fa880a947300b35742377ece69460a9d89a2
Sample code:
Screenshot: