From 684215f4e9da25d5a33b7035933ea83c555daaf3 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Wed, 10 Apr 2024 02:07:50 +0800 Subject: [PATCH 1/6] fix: color --- grammars/grammar-tact.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index c521fb58..f1e4ac13 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -175,7 +175,7 @@ ] }, "operator-logic": { - "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?)", + "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|\\!)", "name": "keyword.operator.logic" }, "operator-mapping": { From 835dcc44179096f5d20bf9dd0fb5789982d0e988 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Wed, 10 Apr 2024 11:20:25 +0800 Subject: [PATCH 2/6] optimize match --- grammars/grammar-tact.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index f1e4ac13..fd2f47df 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -175,7 +175,7 @@ ] }, "operator-logic": { - "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|\\!)", + "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|^\\!(=|!)?)$", "name": "keyword.operator.logic" }, "operator-mapping": { @@ -191,7 +191,7 @@ "name": "keyword.operator.binary" }, "operator-assignment": { - "match": "(\\:?=)", + "match": "(\\:?=^\\!)", "name": "keyword.operator.assignment" }, "control": { From 1335562c67c2d1f933f3bc8afc48e004388ac2b2 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Wed, 10 Apr 2024 11:31:12 +0800 Subject: [PATCH 3/6] fix format in codes --- grammars/grammar-tact.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index fd2f47df..52d2fd26 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -191,7 +191,7 @@ "name": "keyword.operator.binary" }, "operator-assignment": { - "match": "(\\:?=^\\!)", + "match": "(\\:?=[^\\!])", "name": "keyword.operator.assignment" }, "control": { From 4cd96ada916546279fb40d14fe036029312c569c Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Thu, 11 Apr 2024 13:01:05 +0800 Subject: [PATCH 4/6] withdraw op-assignment match --- grammars/grammar-tact.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index 52d2fd26..076c0615 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -191,7 +191,7 @@ "name": "keyword.operator.binary" }, "operator-assignment": { - "match": "(\\:?=[^\\!])", + "match": "(\\:?=)", "name": "keyword.operator.assignment" }, "control": { From f3d0588788ade5837ce981dd7b7539e5d9dc9962 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Thu, 11 Apr 2024 13:14:29 +0800 Subject: [PATCH 5/6] explicitly operators --- grammars/grammar-tact.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index 076c0615..c7f45263 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -175,7 +175,7 @@ ] }, "operator-logic": { - "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|^\\!(=|!)?)$", + "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|!|!!(?!!)|!=)", "name": "keyword.operator.logic" }, "operator-mapping": { From 255dd48f6bc1dceec43f69efb9c959d6243e8921 Mon Sep 17 00:00:00 2001 From: sansx <646924078@qq.com> Date: Thu, 11 Apr 2024 16:14:38 +0800 Subject: [PATCH 6/6] simplify match --- grammars/grammar-tact.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/grammar-tact.json b/grammars/grammar-tact.json index c7f45263..ba203f25 100644 --- a/grammars/grammar-tact.json +++ b/grammars/grammar-tact.json @@ -175,7 +175,7 @@ ] }, "operator-logic": { - "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|!|!!(?!!)|!=)", + "match": "(==|<(?!<)|<=|>(?!>)|>=|\\&\\&|\\|\\||\\:(?!=)|\\?|!|!!|!=)", "name": "keyword.operator.logic" }, "operator-mapping": {