From 94d210c9bf78af1d170534bc3398b334f289be33 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 18 Mar 2024 12:13:23 +0000 Subject: Add initial support for SuperCollider (#9329) --- runtime/queries/supercollider/folds.scm | 7 +++ runtime/queries/supercollider/highlights.scm | 76 ++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 runtime/queries/supercollider/folds.scm create mode 100644 runtime/queries/supercollider/highlights.scm (limited to 'runtime/queries/supercollider') diff --git a/runtime/queries/supercollider/folds.scm b/runtime/queries/supercollider/folds.scm new file mode 100644 index 00000000..214247bc --- /dev/null +++ b/runtime/queries/supercollider/folds.scm @@ -0,0 +1,7 @@ +[ +(function_call) +(code_block) +(function_block) +(control_structure) +] @fold + diff --git a/runtime/queries/supercollider/highlights.scm b/runtime/queries/supercollider/highlights.scm new file mode 100644 index 00000000..0128606d --- /dev/null +++ b/runtime/queries/supercollider/highlights.scm @@ -0,0 +1,76 @@ +(line_comment) @comment.line +(block_comment) @comment.block + +(argument name: (identifier) @variable.parameter) + +(local_var name: (identifier) @variable) +(environment_var name:(identifier) @variable.builtin) +(builtin_var) @constant.builtin + +(function_definition name: (variable) @function) + +(named_argument name: (identifier) @variable.other.member) + +(method_call name: (method_name) @function.method) + +(class) @keyword.storage.type + +(number) @constant.numeric +(float) @constant.numeric.float + +(string) @string +(symbol) @string.special.symbol + +[ +"&&" +"||" +"&" +"|" +"^" +"==" +"!=" +"<" +"<=" +">" +">=" +"<<" +">>" +"+" +"-" +"*" +"/" +"%" +"=" +"|@|" +"@@" +"@|@" +] @operator + +[ +"arg" +"classvar" +"const" +"var" +] @keyword + +[ + "(" + ")" + "[" + "]" + "{" + "}" + "|" +] @punctuation.bracket + +[ + ";" + "." + "," +] @punctuation.delimiter + +(control_structure) @keyword.control.conditional + +(escape_sequence) @string.special + +(duplicated_statement) @keyword.control.repeat -- cgit v1.2.3-70-g09d2