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)
(record_declaration)
(enum_declaration)
(functiondef)
;(functiondef)
(table_constructor)
] @fold

View file

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

View file

@ -3,11 +3,13 @@
(var (identifier)) @definition.var)
(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_name) @definition.function) @scope
(#set! definition.function.scope "parent"))