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