From fc4a9faf0e05ed873fcde914015ec7b2f156613e Mon Sep 17 00:00:00 2001 From: Frederik Tobner Date: Sat, 5 Nov 2022 13:06:33 +0100 Subject: [PATCH] added syntax highlighting for operators --- syntaxes/lox.tmLanguage.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/syntaxes/lox.tmLanguage.json b/syntaxes/lox.tmLanguage.json index fc24ed1..5450915 100644 --- a/syntaxes/lox.tmLanguage.json +++ b/syntaxes/lox.tmLanguage.json @@ -22,6 +22,9 @@ }, { "include": "#digits" + }, + { + "include": "#operators" } ], "repository": { @@ -141,6 +144,22 @@ "match": "\\/\\/.*" } ] + }, + "operators": { + "patterns": [ + { + "match": "(==|!=|<=?|>=?)", + "name": "keyword.operator.comparison.lox" + }, + { + "match": "=", + "name": "keyword.operator.assignment.lox" + }, + { + "match": "(\\+|\\-|\\*|\\/)", + "name": "keyword.operator.arithmetic.lox" + } + ] } }, "scopeName": "source.lox"