highlights(ecma): limit constructor highlight

This commit is contained in:
ObserverOfTime 2023-02-03 10:42:12 +02:00 committed by Stephan Seitz
parent a8ced4ce8b
commit 0e6d4b4172

View file

@ -20,8 +20,8 @@
; Special identifiers
;--------------------
((identifier) @constructor
(#lua-match? @constructor "^[A-Z]"))
((identifier) @type
(#lua-match? @type "^[A-Z]"))
((identifier) @constant
(#lua-match? @constant "^[A-Z_][A-Z%d_]+$"))
@ -89,6 +89,12 @@
function: (member_expression
property: [(property_identifier) (private_property_identifier)] @method.call))
; Constructor
;------------
(new_expression
constructor: (identifier) @constructor)
; Variables
;----------
(namespace_import