Add modules highlighting
Still debating whether modules should be highlighted as namespaces or as function calls.
This commit is contained in:
parent
3e4879a593
commit
a9ec312792
|
@ -24,6 +24,13 @@
|
|||
|
||||
; Declarations {{{
|
||||
(identifier) @variable
|
||||
|
||||
(module
|
||||
type: (identifier) @module)
|
||||
|
||||
(module
|
||||
(property
|
||||
field: (identifier) @variable.member))
|
||||
; }}}
|
||||
|
||||
; vim: sw=2 foldmethod=marker
|
||||
|
|
21
test/highlight/modules.bp
Normal file
21
test/highlight/modules.bp
Normal file
|
@ -0,0 +1,21 @@
|
|||
foo {}
|
||||
// <- module
|
||||
|
||||
foo ()
|
||||
// <- module
|
||||
|
||||
foo {
|
||||
// <- module
|
||||
field: 12,
|
||||
// <- variable.member
|
||||
another_field: 27,
|
||||
// <- variable.member
|
||||
}
|
||||
|
||||
foo (
|
||||
// <- module
|
||||
field = 42,
|
||||
// <- variable.member
|
||||
done = false,
|
||||
// <- variable.member
|
||||
)
|
Loading…
Reference in a new issue