Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/ponylang/highlights.scm')
-rw-r--r--runtime/queries/ponylang/highlights.scm18
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/queries/ponylang/highlights.scm b/runtime/queries/ponylang/highlights.scm
index 2d0594a7..f67e9a68 100644
--- a/runtime/queries/ponylang/highlights.scm
+++ b/runtime/queries/ponylang/highlights.scm
@@ -9,6 +9,7 @@
(character) @constant.character
;; strings and docstring
+(string) @string
(source_file docstring: (string) @string.special)
(entity docstring: (string) @string.special)
(method docstring: (string) @string.special) ; docstring for methods without body
@@ -18,7 +19,6 @@
(behavior body: (block . (string) @string.special))
(constructor body: (block . (string) @string.special))
(field docstring: (string) @string.special)
-(string) @string
;; Punctuation
[
@@ -137,6 +137,14 @@
"<="
] @operator
+;; variables
+;; references to upper case things are considered constructors
+(identifier) @variable
+(
+ (identifier) @constructor
+ (#match? @constructor "^[A-Z]")
+)
+
;; Types
(entity name: (identifier) @type)
(nominal_type name: (identifier) @type)
@@ -166,11 +174,3 @@
;; annotations
(annotations (identifier) @attribute)
-;; variables
-;; references to upper case things are considered constructors
-(
- (identifier) @constructor
- (#match @constructor "^[A-Z]")
-)
-(identifier) @variable
-