From 297ba434d1979fef0137ab7b2e2fd8b90a567c4f Mon Sep 17 00:00:00 2001 From: Jacob Date: Wed, 27 Aug 2025 01:51:32 -0400 Subject: [PATCH] Updated. --- extension.toml | 2 +- languages/scl/highlights.scm | 51 ++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/extension.toml b/extension.toml index da61ac8..be23cc9 100644 --- a/extension.toml +++ b/extension.toml @@ -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" diff --git a/languages/scl/highlights.scm b/languages/scl/highlights.scm index 137821d..579c04e 100644 --- a/languages/scl/highlights.scm +++ b/languages/scl/highlights.scm @@ -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