diff --git a/RustEnhanced.sublime-syntax b/RustEnhanced.sublime-syntax index 6b4990a..5d83a8b 100644 --- a/RustEnhanced.sublime-syntax +++ b/RustEnhanced.sublime-syntax @@ -214,7 +214,7 @@ contexts: scope: punctuation.separator.rust push: after-operator - - match: '\b[[:lower:]_][[:lower:][:digit:]_]*(?=\()' + - match: '\b[[:lower:]_][[:lower:][:digit:]_]*\s*(?=\()' scope: variable.function.rust - match: '{{identifier}}' diff --git a/tests/syntax-rust/syntax_test_expr.rs b/tests/syntax-rust/syntax_test_expr.rs index a3c5d29..7edb4b2 100644 --- a/tests/syntax-rust/syntax_test_expr.rs +++ b/tests/syntax-rust/syntax_test_expr.rs @@ -167,3 +167,22 @@ a <<= b; //^^^ keyword.operator.assignment a >>= b; //^^^ keyword.operator.assignment + +fn call_expressions() { + call(); +// ^^^^ variable.function +// ^ meta.group punctuation.section.group.begin +// ^ meta.group punctuation.section.group.end +// ^ punctuation.terminator + + call_with_space (); +// ^^^^^^^^^^^^^^^^ meta.function meta.block variable.function +// ^ meta.group punctuation.section.group.begin +// ^ meta.group punctuation.section.group.end + self.method(); +// ^^^^ variable.language +// ^ punctuation.accessor.dot +// ^^^^^^ variable.function +// ^ meta.group punctuation.section.group.begin +// ^ meta.group punctuation.section.group.end +}