mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
[language-c] Support declarations of pointers-of-pointers
This commit is contained in:
parent
6466d25928
commit
995196a138
@ -140,9 +140,10 @@
|
||||
declarator: (identifier) @variable.declaration.c)
|
||||
|
||||
; The "x" in `SomeType *x;`
|
||||
(declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.declaration.pointer.c))
|
||||
; (Should work no matter how many pointers deep we are.)
|
||||
(pointer_declarator
|
||||
declarator: [(identifier) (field_identifier)] @variable.declaration.pointer.c
|
||||
(#is? test.descendantOfType "declaration field_declaration"))
|
||||
|
||||
; A member of a struct.
|
||||
(field_declaration
|
||||
@ -193,15 +194,10 @@
|
||||
declarator: (identifier) @variable.parameter.c)
|
||||
|
||||
; The "foo" in `const char *foo` within a parameter list.
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.parameter.c))
|
||||
|
||||
; The "foo" in `SomeType **foo` within a parameter list.
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.parameter.c)))
|
||||
; (Should work no matter how many pointers deep we are.)
|
||||
(pointer_declarator
|
||||
declarator: [(identifier) (field_identifier)] @variable.parameter.pointer.c
|
||||
(#is? test.descendantOfType "parameter_declaration"))
|
||||
|
||||
; The "foo" in `const char foo[]` within a parameter list.
|
||||
(parameter_declaration
|
||||
|
@ -230,9 +230,10 @@
|
||||
declarator: (identifier) @variable.declaration.cpp)
|
||||
|
||||
; The "x" in `SomeType *x;`
|
||||
(declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.declaration.pointer.c))
|
||||
; (Should work no matter how many pointers deep we are.)
|
||||
(pointer_declarator
|
||||
declarator: [(identifier) (field_identifier)] @variable.declaration.pointer.c
|
||||
(#is? test.descendantOfType "declaration field_declaration"))
|
||||
|
||||
; A member of a struct.
|
||||
(field_declaration
|
||||
@ -286,15 +287,10 @@
|
||||
declarator: (identifier) @variable.parameter.cpp)
|
||||
|
||||
; The "foo" in `const char *foo` within a parameter list.
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.parameter.cpp))
|
||||
|
||||
; The "foo" in `SomeType **foo` within a parameter list.
|
||||
(parameter_declaration
|
||||
declarator: (pointer_declarator
|
||||
declarator: (pointer_declarator
|
||||
declarator: (identifier) @variable.parameter.c)))
|
||||
; (Should work no matter how many pointers deep we are.)
|
||||
(pointer_declarator
|
||||
declarator: [(identifier) (field_identifier)] @variable.parameter.pointer.c
|
||||
(#is? test.descendantOfType "parameter_declaration"))
|
||||
|
||||
(parameter_declaration
|
||||
declarator: (reference_declarator
|
||||
|
Loading…
Reference in New Issue
Block a user