slang-ts-mode: pattern match scalar/vector types
This commit is contained in:
parent
e25e208a8e
commit
fd1f1033fa
22
init.org
22
init.org
|
@ -1653,7 +1653,19 @@ delimiters < and >'s."
|
|||
:language 'slang
|
||||
:feature 'keyword
|
||||
`([,@slang-ts-mode--keywords] @font-lock-keyword-face)
|
||||
;; ([,@slang-ts-mode--locations] @font-lock-builtin-face)
|
||||
|
||||
:language 'slang
|
||||
:feature 'type
|
||||
`(
|
||||
((call_expression function: (identifier) @font-lock-type-face)
|
||||
(:match ,(rx bos
|
||||
(and (or "bool" "int" "uint" "float")
|
||||
(or
|
||||
(? (any "1" "2" "3" "4"))
|
||||
(? (and (any "1" "2" "3" "4") "x" (any "1" "2" "3" "4")))))
|
||||
eos) @font-lock-type-face))
|
||||
((call_expression function: (identifier) @font-lock-function-call-face))
|
||||
(type_identifier) @font-lock-type-face)
|
||||
|
||||
:language 'slang
|
||||
:feature 'definition
|
||||
|
@ -1668,7 +1680,9 @@ delimiters < and >'s."
|
|||
|
||||
:language 'slang
|
||||
:feature 'function
|
||||
'((call_expression function: (identifier) @font-lock-function-call-face))
|
||||
'((call_expression function: (identifier) @font-lock-function-call-face)
|
||||
(call_expression function: (_ field: (field_identifier) @font-lock-function-call-face))
|
||||
)
|
||||
|
||||
:language 'slang
|
||||
:feature 'string
|
||||
|
@ -1696,10 +1710,6 @@ delimiters < and >'s."
|
|||
:feature 'number
|
||||
'(((number_literal) @font-lock-number-face))
|
||||
|
||||
:language 'slang
|
||||
:feature 'type
|
||||
'(((type_identifier) @font-lock-type-face))
|
||||
|
||||
:language 'slang
|
||||
:feature 'property
|
||||
'(((field_identifier) @font-lock-property-use-face))
|
||||
|
|
Loading…
Reference in a new issue