mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 04:10:06 -04:00
fix(ecma): prioritize builtins
This commit is contained in:
parent
f53e6e82df
commit
c543ffae1c
1 changed files with 19 additions and 16 deletions
|
|
@ -74,22 +74,6 @@
|
||||||
"TypeError"
|
"TypeError"
|
||||||
"URIError"))
|
"URIError"))
|
||||||
|
|
||||||
((identifier) @namespace.builtin
|
|
||||||
(#eq? @namespace.builtin "Intl"))
|
|
||||||
|
|
||||||
((identifier) @function.builtin
|
|
||||||
(#any-of? @function.builtin
|
|
||||||
"eval"
|
|
||||||
"isFinite"
|
|
||||||
"isNaN"
|
|
||||||
"parseFloat"
|
|
||||||
"parseInt"
|
|
||||||
"decodeURI"
|
|
||||||
"decodeURIComponent"
|
|
||||||
"encodeURI"
|
|
||||||
"encodeURIComponent"
|
|
||||||
"require"))
|
|
||||||
|
|
||||||
; Function and method definitions
|
; Function and method definitions
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
|
|
||||||
|
|
@ -147,6 +131,25 @@
|
||||||
function: (member_expression
|
function: (member_expression
|
||||||
property: [(property_identifier) (private_property_identifier)] @method.call))
|
property: [(property_identifier) (private_property_identifier)] @method.call))
|
||||||
|
|
||||||
|
; Builtins
|
||||||
|
;---------
|
||||||
|
|
||||||
|
((identifier) @namespace.builtin
|
||||||
|
(#eq? @namespace.builtin "Intl"))
|
||||||
|
|
||||||
|
((identifier) @function.builtin
|
||||||
|
(#any-of? @function.builtin
|
||||||
|
"eval"
|
||||||
|
"isFinite"
|
||||||
|
"isNaN"
|
||||||
|
"parseFloat"
|
||||||
|
"parseInt"
|
||||||
|
"decodeURI"
|
||||||
|
"decodeURIComponent"
|
||||||
|
"encodeURI"
|
||||||
|
"encodeURIComponent"
|
||||||
|
"require"))
|
||||||
|
|
||||||
; Constructor
|
; Constructor
|
||||||
;------------
|
;------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue