From 5ec199aa6c9119cac7a4e53694eaa7f9273bc58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 6 Jul 2022 22:59:21 +0800 Subject: support filter of binary operator --- script/vm/operator.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'script/vm/operator.lua') diff --git a/script/vm/operator.lua b/script/vm/operator.lua index e71911f9..9a8e255d 100644 --- a/script/vm/operator.lua +++ b/script/vm/operator.lua @@ -52,6 +52,14 @@ local function checkOperators(operators, op, value, result) or not operator.extends then goto CONTINUE end + if value and operator.exp then + local valueNode = vm.compileNode(value) + local expNode = vm.compileNode(operator.exp) + local uri = guide.getUri(operator) + if not vm.isSubType(uri, valueNode, expNode) then + goto CONTINUE + end + end if not result then result = vm.createNode() end -- cgit v1.2.3