Update teal queries

This commit is contained in:
Stephan Seitz 2020-11-28 22:05:07 +01:00 committed by Thomas Vigouroux
parent 9cfcae6a9c
commit 47fae4eff8
3 changed files with 13 additions and 13 deletions

View file

@ -7,6 +7,6 @@
(function_statement) (function_statement)
(record_declaration) (record_declaration)
(enum_declaration) (enum_declaration)
(functiondef) ;(functiondef)
(table_constructor) (table_constructor)
] @fold ] @fold

View file

@ -32,25 +32,23 @@
[ "," "." ":"] @punctuation.delimiter [ "," "." ":"] @punctuation.delimiter
[ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket [ "(" ")" "[" "]" "{" "}" ] @punctuation.bracket
("<" @punctuation.bracket (typeargs ["<" ">"] @punctuation.bracket)
. (typearg) . ("," (typearg))* .
">" @punctuation.bracket)
(identifier) @variable (identifier) @variable
(boolean) @boolean (boolean) @boolean
(nil) @constant.builtin (nil) @constant.builtin
(varargs) @constant (varargs) @constant
; function stuffs ;; function stuffs;
(functiondef ["function" "end"] @keyword.function)
(function_statement [(function_name) (function_name (_))] @function) (function_statement (function_name) @function)
(function_statement ["function" "end"] @keyword.function) (function_statement ["function" "end"] @keyword.function)
(function_call (function_call
(identifier) @function . (arguments)) (identifier) @function . (arguments))
(arg_name) @parameter (arg
name: (identifier) @parameter)
; type stuffs ; type stuffs
(type_declaration "type" @keyword) (type_declaration "type" @keyword)
@ -59,12 +57,12 @@
(function_type "function" @type) (function_type "function" @type)
(record_name) @type (record_name) @type
(enum_name) @type (enum_name) @type
(typearg) @parameter (typeargs (identifier) @parameter)
(table_constructor ["{" "}"] @constructor) (table_constructor ["{" "}"] @constructor)
(comment) @comment (comment) @comment
(string) @string (string) @string
(number) @number (number) @number
; TODO (label_statement) @label ;; TODO (label_statement) @label
(ERROR) @error (ERROR) @error

View file

@ -3,11 +3,13 @@
(var (identifier)) @definition.var) (var (identifier)) @definition.var)
(var_assignment (var_assignment
(var (identifier)) @definition.associated @definition.var) (var (identifier)) @definition.var)
(arg_name) @definition.parameter (arg
name: (identifier) @definition.parameter)
(typeargs (identifier) @definition.type)
(functiondef) @scope ;(functiondef) @scope
((function_statement ((function_statement
(function_name) @definition.function) @scope (function_name) @definition.function) @scope
(#set! definition.function.scope "parent")) (#set! definition.function.scope "parent"))