diff --git a/Support/QML.sublime-syntax b/Support/QML.sublime-syntax index 66391c2..729b202 100644 --- a/Support/QML.sublime-syntax +++ b/Support/QML.sublime-syntax @@ -80,7 +80,7 @@ contexts: scope: keyword.control.pragma.qml push: - pragma-meta - - maybe-pragma-value + - maybe-pragma-rhs - pragma-name pragma-meta: @@ -88,13 +88,17 @@ contexts: - meta_scope: meta.pragma.qml - include: immediately-pop - maybe-pragma-value: + maybe-pragma-rhs: - match: ':' scope: punctuation.separator.mapping.key-value.qml - set: - - match: '{{identifier}}' - scope: storage.modifier.pragma.qml - - include: semicolon-or-eol-pop + set: pragma-value-list + - include: semicolon-or-eol-pop + + pragma-value-list: + - match: '{{identifier}}' + scope: storage.modifier.pragma.qml + - match: ',' + scope: punctuation.separator.comma.qml - include: semicolon-or-eol-pop pragma-name: diff --git a/Support/tests/syntax_test_QML.qml b/Support/tests/syntax_test_QML.qml index a6ce39d..f2fb763 100644 --- a/Support/tests/syntax_test_QML.qml +++ b/Support/tests/syntax_test_QML.qml @@ -10,12 +10,22 @@ pragma Strict // ^^^^^^^^^^ meta.pragma.qml // ^^^^^^ storage.modifier.pragma -pragma ComponentBehavior: Bound +pragma ComponentBehavior: Bound; // <- meta.pragma keyword.control.pragma // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.pragma.qml // ^^^^^^^^^^^^^^^^^ storage.modifier.pragma // ^ punctuation.separator.mapping.key-value // ^^^^^ storage.modifier.pragma +// ^ punctuation.terminator.statement.qml + +pragma ValueTypeBehavior: Copy, Addressable +// <- meta.pragma keyword.control.pragma +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.pragma.qml +// ^^^^^^^^^^^^^^^^^ storage.modifier.pragma +// ^ punctuation.separator.mapping.key-value +// ^^^^ storage.modifier.pragma +// ^ punctuation.separator.comma +// ^^^^^^^^^^^ storage.modifier.pragma /* no version */ import QtQml