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