Consider module as function call for highlighting
All checks were successful
ci/woodpecker/push/check Pipeline was successful
All checks were successful
ci/woodpecker/push/check Pipeline was successful
Their semantic is closer to a function call (like i.e: Bazel rules) rather than a module/namespace. Similarly for their properties, which are more like parameters than members.
This commit is contained in:
parent
be1e3f07d3
commit
f6e1266493
|
@ -42,11 +42,11 @@
|
||||||
(identifier) @variable
|
(identifier) @variable
|
||||||
|
|
||||||
(module
|
(module
|
||||||
type: (identifier) @module)
|
type: (identifier) @function.call)
|
||||||
|
|
||||||
(module
|
(module
|
||||||
(property
|
(property
|
||||||
field: (identifier) @variable.member))
|
field: (identifier) @variable.parameter))
|
||||||
; }}}
|
; }}}
|
||||||
|
|
||||||
; Built-ins {{{
|
; Built-ins {{{
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
foo {}
|
foo {}
|
||||||
// <- module
|
// <- function.call
|
||||||
|
|
||||||
foo ()
|
foo ()
|
||||||
// <- module
|
// <- function.call
|
||||||
|
|
||||||
foo {
|
foo {
|
||||||
// <- module
|
// <- function.call
|
||||||
field: 12,
|
field: 12,
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
another_field: 27,
|
another_field: 27,
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
}
|
}
|
||||||
|
|
||||||
foo (
|
foo (
|
||||||
// <- module
|
// <- function.call
|
||||||
field = 42,
|
field = 42,
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
done = false,
|
done = false,
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
foo {
|
foo {
|
||||||
field: {
|
field: {
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
key: 42,
|
key: 42,
|
||||||
// <- property
|
// <- property
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,5 +11,5 @@ select = 42
|
||||||
// Or module property
|
// Or module property
|
||||||
foo {
|
foo {
|
||||||
select: 42,
|
select: 42,
|
||||||
// <- variable.member
|
// <- variable.parameter
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue