Merge pull request #735 from savetheclocktower/tree-sitter-september-fixes

Tree-sitter running fixes for September
This commit is contained in:
Andrew Dupont 2023-10-15 12:44:19 -07:00 committed by GitHub
commit 418b6f0e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 3010 additions and 3000 deletions

View File

@ -186,7 +186,7 @@
}
.syntax--meta {
&.syntax--class {
&.syntax--class:not(.syntax--block) {
color: @yellow;
&.syntax--body {

View File

@ -186,7 +186,7 @@
}
.syntax--meta {
&.syntax--class {
&.syntax--class:not(.syntax--block) {
color: @yellow;
&.syntax--body {

View File

@ -43,18 +43,18 @@
(type_identifier) @_IGNORE_
(#set! capture.final true))
(primitive_type) @storage.type.builtin.c
(type_identifier) @storage.type.other.c
(primitive_type) @support.type.builtin.c
(type_identifier) @support.type.other.c
; These types are all reserved words; if we see an identifier with this name,
; it must be a type.
((identifier) @storage.type.builtin.c
(#match? @storage.type.builtin.c "^(char|int|float|double|long)$"))
((identifier) @support.type.builtin.c
(#match? @support.type.builtin.c "^(char|int|float|double|long)$"))
; Assume any identifier that ends in `_t` is a type. This convention is not
; always followed, but it's a very strong indicator when it's present.
((identifier) @storage.type.other.c
(#match? @storage.type.other.c "_t$"))
((identifier) @support.type.other.c
(#match? @support.type.other.c "_t$"))
[
"enum"

View File

@ -49,24 +49,31 @@
(#set! capture.final true))
(primitive_type) @storage.type.builtin.cpp
(primitive_type) @support.type.builtin.cpp
; Type parameters
(template_argument_list
(type_descriptor
type: (type_identifier) @variable.parameter.type.cpp
(#set! capture.final true)))
(class_specifier
(type_identifier) @entity.name.class.cpp
(#set! capture.final true))
(type_identifier) @storage.type.other.cpp
(type_identifier) @support.type.other.cpp
; (struct_specifier) @storage.type.cpp
; These types are all reserved words; if we see an identifier with this name,
; it must be a type.
((identifier) @storage.type.builtin.cpp
(#match? @storage.type.builtin.cpp "^(char|int|float|double|long)$"))
((identifier) @support.type.builtin.cpp
(#match? @support.type.builtin.cpp "^(char|int|float|double|long)$"))
; Assume any identifier that ends in `_t` is a type. This convention is not
; always followed, but it's a very strong indicator when it's present.
((identifier) @storage.type.other.cpp
(#match? @storage.type.other.cpp "_t$"))
((identifier) @support.type.other.cpp
(#match? @support.type.other.cpp "_t$"))
[

View File

@ -21,6 +21,9 @@ firstLineRegex: [
injectionRegex: '(^(bash|BASH)$|sh^|SH^)'
treeSitter:
# Grammar generated on 2023-09-22 from commit:
# fd4e40dab883d6456da4d847de8321aee9c80805
parserSource: 'github:tree-sitter/tree-sitter-bash#fd4e40dab883d6456da4d847de8321aee9c80805'
grammar: 'tree-sitter/tree-sitter-bash.wasm'
highlightsQuery: 'tree-sitter/highlights.scm'
tagsQuery: 'tree-sitter/tags.scm'

View File

@ -210,7 +210,7 @@
}
.syntax--meta {
&.syntax--class {
&.syntax--class:not(.syntax--block) {
color: @hue-6-2;
&.syntax--body {

View File

@ -210,7 +210,7 @@
}
.syntax--meta {
&.syntax--class {
&.syntax--class:not(.syntax--block) {
color: @hue-6-2;
&.syntax--body {

File diff suppressed because it is too large Load Diff

Binary file not shown.