|
|
@ -46,10 +46,16 @@
|
|
|
|
])
|
|
|
|
])
|
|
|
|
(#eq? @keyword "define"))
|
|
|
|
(#eq? @keyword "define"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
|
|
|
|
name: (atom) @keyword
|
|
|
|
|
|
|
|
(arguments
|
|
|
|
|
|
|
|
(_) @keyword.directive)
|
|
|
|
|
|
|
|
(#match? @keyword "ifn?def"))
|
|
|
|
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
(attribute
|
|
|
|
name: (atom) @keyword
|
|
|
|
name: (atom) @keyword
|
|
|
|
module: (atom) @module
|
|
|
|
module: (atom) @module
|
|
|
|
(#eq? @keyword "spec"))
|
|
|
|
(#eq? @keyword "(spec|callback)"))
|
|
|
|
|
|
|
|
|
|
|
|
; Functions
|
|
|
|
; Functions
|
|
|
|
(function name: (atom) @function)
|
|
|
|
(function name: (atom) @function)
|
|
|
@ -69,10 +75,7 @@
|
|
|
|
(record name: (atom) @type)
|
|
|
|
(record name: (atom) @type)
|
|
|
|
|
|
|
|
|
|
|
|
; Keywords
|
|
|
|
; Keywords
|
|
|
|
((attribute name: (atom) @keyword)
|
|
|
|
(attribute name: (atom) @keyword)
|
|
|
|
(#match?
|
|
|
|
|
|
|
|
@keyword
|
|
|
|
|
|
|
|
"^(define|export|export_type|include|include_lib|ifdef|ifndef|if|elif|else|endif|vsn|on_load|behaviour|record|file|type|opaque|spec)$"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
|
|
|
|
["case" "fun" "if" "of" "when" "end" "receive" "try" "catch" "after" "begin" "maybe"] @keyword
|
|
|
|
|
|
|
|
|
|
|
@ -86,10 +89,6 @@
|
|
|
|
(unary_operator operator: _ @operator)
|
|
|
|
(unary_operator operator: _ @operator)
|
|
|
|
["/" ":" "#" "->"] @operator
|
|
|
|
["/" ":" "#" "->"] @operator
|
|
|
|
|
|
|
|
|
|
|
|
; Comments
|
|
|
|
|
|
|
|
((variable) @comment.discard
|
|
|
|
|
|
|
|
(#match? @comment.discard "^_"))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(tripledot) @comment.discard
|
|
|
|
(tripledot) @comment.discard
|
|
|
|
|
|
|
|
|
|
|
|
(comment) @comment
|
|
|
|
(comment) @comment
|
|
|
@ -99,12 +98,13 @@
|
|
|
|
"?"+ @keyword.directive
|
|
|
|
"?"+ @keyword.directive
|
|
|
|
name: (_) @keyword.directive)
|
|
|
|
name: (_) @keyword.directive)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Comments
|
|
|
|
|
|
|
|
((variable) @comment.discard
|
|
|
|
|
|
|
|
(#match? @comment.discard "^_"))
|
|
|
|
|
|
|
|
|
|
|
|
; Basic types
|
|
|
|
; Basic types
|
|
|
|
(variable) @variable
|
|
|
|
(variable) @variable
|
|
|
|
[
|
|
|
|
(atom) @string.special.symbol
|
|
|
|
(atom)
|
|
|
|
|
|
|
|
(quoted_atom)
|
|
|
|
|
|
|
|
] @string.special.symbol
|
|
|
|
|
|
|
|
(string) @string
|
|
|
|
(string) @string
|
|
|
|
(character) @constant.character
|
|
|
|
(character) @constant.character
|
|
|
|
|
|
|
|
|
|
|
|