feat(luap): highlights more consistent with regex (#5819)

This commit is contained in:
Riley Bruins 2023-12-23 01:40:10 -08:00 committed by GitHub
parent 454c3a9ba8
commit 1c619f5f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 9 deletions

View file

@ -1,9 +1,10 @@
"." @character
[ [
(anchor_begin) (anchor_begin)
(anchor_end) (anchor_end)
] @string.escape ] @punctuation.delimiter
(pattern
(character "." @variable.builtin))
[ [
"[" "]" "[" "]"
@ -19,17 +20,17 @@
(range (range
from: (character) @constant from: (character) @constant
"-" @punctuation.delimiter "-" @operator
to: (character) @constant) to: (character) @constant)
(set (set
(character) @constant) (character) @constant)
(negated_set
(character) @constant)
(class) @keyword (class) @keyword
(negated_set (negated_set "^" @operator)
"^" @operator
(character) @constant)
(balanced_match (balanced_match
(character) @parameter) (character) @parameter)

View file

@ -32,7 +32,8 @@
[ "*" "+" "?" "|" "=" "!" "-"] @operator [ "*" "+" "?" "|" "=" "!" "-"] @operator
[ [
(any_character)
(start_assertion) (start_assertion)
(end_assertion) (end_assertion)
] @variable.builtin ] @punctuation.delimiter
(any_character) @variable.builtin