diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/vm/operator.lua | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/script/vm/operator.lua b/script/vm/operator.lua index 48e29304..9c68e648 100644 --- a/script/vm/operator.lua +++ b/script/vm/operator.lua @@ -73,15 +73,22 @@ local function checkOperators(operators, op, value, result) 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 + for vo in valueNode:eachObject() do + if vm.isSubType(uri, vo, expNode) then + if not result then + result = vm.createNode() + end + result:merge(vm.compileNode(operator.extends)) + return result + end end + else + if not result then + result = vm.createNode() + end + result:merge(vm.compileNode(operator.extends)) + return result end - if not result then - result = vm.createNode() - end - result:merge(vm.compileNode(operator.extends)) - break ::CONTINUE:: end return result |