Updated.
This commit is contained in:
@@ -8,4 +8,4 @@ repository = "https://git.signorovitch.org/jacob/zed-scl"
|
|||||||
|
|
||||||
[grammars.scl]
|
[grammars.scl]
|
||||||
repository = "https://git.signorovitch.org/jacob/tree-sitter-scl"
|
repository = "https://git.signorovitch.org/jacob/tree-sitter-scl"
|
||||||
rev = "7cad33405ec41b89a060a6bae7fb437bde99b9ed"
|
rev = "1f7a6fe01e1869f6a46e5fbda6ead40b9bda2075"
|
||||||
|
@@ -1,34 +1,33 @@
|
|||||||
;; Numbers.
|
|
||||||
(num) @number
|
(num) @number
|
||||||
|
(bool) @boolean
|
||||||
|
|
||||||
;; Function names when defining.
|
|
||||||
(funcdef name: (word) @function)
|
|
||||||
|
|
||||||
;; Function calls.
|
|
||||||
(callexp fn: (word) @function)
|
|
||||||
|
|
||||||
;; Variables.
|
|
||||||
(word) @variable
|
(word) @variable
|
||||||
|
|
||||||
;; Parameters inside function/lambda.
|
(binexp op: _ @operator)
|
||||||
(params (word) @variable)
|
|
||||||
|
(callexp
|
||||||
|
fn: (word) @function)
|
||||||
|
|
||||||
|
(funcdef
|
||||||
|
name: (word) @function)
|
||||||
|
|
||||||
|
(vardef
|
||||||
|
name: (word) @variable)
|
||||||
|
|
||||||
|
(lambda
|
||||||
|
params: (params (word) @variable))
|
||||||
|
|
||||||
;; Operators.
|
|
||||||
[
|
[
|
||||||
"+"
|
"if"
|
||||||
"-"
|
"else"
|
||||||
"*"
|
"?"
|
||||||
"/"
|
] @keyword
|
||||||
"="
|
((word) @function.builtin
|
||||||
] @operator
|
(#any-of? @function.builtin "_if" "eq" "sum" "mul" "div" "sub"))
|
||||||
|
|
||||||
;; Lambdas.
|
"{" @punctuation.bracket
|
||||||
"\\" @keyword
|
"}" @punctuation.bracket
|
||||||
|
"(" @punctuation.bracket
|
||||||
|
")" @punctuation.bracket
|
||||||
|
|
||||||
;; Other keywords.
|
";" @punctuation.delimiter
|
||||||
|
|
||||||
;; Parentheses.
|
|
||||||
[ "(" ")" ] @punctuation.bracket
|
|
||||||
|
|
||||||
;; Commas.
|
|
||||||
"," @punctuation.delimiter
|
|
||||||
|
Reference in New Issue
Block a user