From 2146233043a8c9138340592492fb0d693b30e4fa Mon Sep 17 00:00:00 2001 From: ivan tkachenko Date: Sun, 10 Sep 2023 23:42:39 +0300 Subject: [PATCH] Syntax: Recover if method's return type is not found --- Support/QML.sublime-syntax | 2 +- Support/tests/syntax_test_QML.qml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Support/QML.sublime-syntax b/Support/QML.sublime-syntax index c6dc379..66391c2 100644 --- a/Support/QML.sublime-syntax +++ b/Support/QML.sublime-syntax @@ -919,7 +919,7 @@ contexts: qml-method-declaration-expect-return-type: - match: ':' scope: punctuation.separator.type.qml - set: property-type-member + set: expect-property-type-member - include: else-pop # END methods diff --git a/Support/tests/syntax_test_QML.qml b/Support/tests/syntax_test_QML.qml index 6c15bc2..0fc4ab5 100644 --- a/Support/tests/syntax_test_QML.qml +++ b/Support/tests/syntax_test_QML.qml @@ -543,6 +543,11 @@ WithMethods { // ^ meta.function.js punctuation.separator.type.qml // ^^^^ meta.function.js meta.type.qml // ^^^^^^^^ meta.block.qml meta.function.js meta.block.js +// ^^^ keyword.declaration.js + function returns(): {let i;} +// ^^^^^^^^ keyword.declaration.function.js +// ^ meta.function.js punctuation.separator.type.qml +// ^^^^^^^^ meta.block.qml meta.function.js meta.block.js // ^^^ keyword.declaration.js }