39 lines
849 B
Scheme
39 lines
849 B
Scheme
; TODO: automate highlighting testing
|
|
; TODO: ensure that name segments are highlighted correctly in each context
|
|
|
|
(comment) @comment.line
|
|
(integer) @constant.numeric
|
|
(string) @string.quoted
|
|
(escape_sequence) @constant.character.escape
|
|
(variable) @variable
|
|
(expr symbol: _ @constant)
|
|
(import (symbol) @module)
|
|
(type (name)) @type
|
|
(type_alias name: _ @type)
|
|
|
|
(rule relation: (name) @constructor)
|
|
(relation name: (symbol) @function)
|
|
(apply head: _ @function)
|
|
|
|
[ ":-" "," "." ":" ] @punctuation.delimiter
|
|
[ "(" ")" "{" "}" ] @punctuation.bracket
|
|
|
|
(aggregate_op) @keyword
|
|
(binary_expr op: _ @operator)
|
|
(unary_expr op: _ @operator)
|
|
|
|
[
|
|
"type"
|
|
"decision"
|
|
"define"
|
|
"import"
|
|
"input"
|
|
"output"
|
|
"soft"
|
|
] @keyword
|
|
|
|
; doc comments
|
|
((comment)+ @comment.docs . (relation))
|
|
((comment)+ @comment.docs . (rule))
|
|
((comment)+ @comment.docs . (assumption))
|