fixing lint errors for brightscript

This commit is contained in:
ajdelcimmuto 2025-03-30 18:44:35 -05:00
parent c34022ded9
commit a2cd848e1c
3 changed files with 38 additions and 7 deletions

View file

@ -6,4 +6,3 @@
(if_statement)
(try_statement)
] @fold

View file

@ -1,9 +1,11 @@
; Identifiers
(identifier) @variable
; Function and sub declarations
; Function declaration
(function_statement
name: (identifier) @function)
; Sub declaration
(sub_statement
name: (identifier) @function)
@ -39,14 +41,23 @@
; Statements
(if_statement) @keyword.conditional
(conditional_compl) @keyword.conditional
(for_statement) @keyword.repeat
(while_statement) @keyword.repeat
(try_statement) @keyword.exception
(return_statement) @keyword.return
(throw_statement) @keyword.exception
(assignment_statement) @operator
(print_statement) @function.builtin
(constant) @constant
; Keywords
@ -83,24 +94,41 @@
; Literals
(boolean) @boolean
(number) @number
(string) @string
(invalid) @constant.builtin
; Comments
(comment) @comment
; Punctuation
["(" ")" "[" "]" "{" "}" "." "," "?." "?["] @punctuation.delimiter
[
"("
")"
"["
"]"
"{"
"}"
"."
","
"?."
"?["
] @punctuation.delimiter
; Special highlights for library statements
(library_statement) @keyword.import
(library_statement
path: (string) @module)
; Array and associative array literals
(array) @constructor
(assoc_array) @constructor
(assoc_array_element
key: (identifier) @property)
@ -135,7 +163,13 @@
] @keyword
; Special keywords (these might still need to be strings if not defined as separate nodes)
["then" "else" "else if" "#else" "#else if"] @keyword
[
"then"
"else"
"else if"
"#else"
"#else if"
] @keyword
; Exit statements
[

View file

@ -1,4 +1,2 @@
([
(comment)
] @injection.content
((comment) @injection.content
(#set! injection.language "comment"))