From 021a3ff60c46ffbc8fc488136f7857da5c21b71b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sun, 24 Apr 2022 03:24:13 +0800 Subject: truly -> truthy --- script/vm/runner.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'script/vm/runner.lua') diff --git a/script/vm/runner.lua b/script/vm/runner.lua index cda66347..2771b0a9 100644 --- a/script/vm/runner.lua +++ b/script/vm/runner.lua @@ -16,7 +16,7 @@ mt.index = 1 ---@field _hasSorted boolean ---@class vm.runner.step ----@field type 'truly' | 'falsy' | 'as' | 'add' | 'remove' | 'object' | 'save' | 'load' | 'merge' +---@field type 'truthy' | 'falsy' | 'as' | 'add' | 'remove' | 'object' | 'save' | 'load' | 'merge' ---@field pos integer ---@field order? integer ---@field node? vm.node @@ -49,7 +49,7 @@ function mt:_compileNarrowByFilter(filter, outStep, blockStep) local exp = filter[1] if exp.type == 'getlocal' and exp.node == self.loc then self.steps[#self.steps+1] = { - type = 'truly', + type = 'truthy', pos = filter.finish, ref1 = outStep, } @@ -125,7 +125,7 @@ function mt:_compileNarrowByFilter(filter, outStep, blockStep) ref1 = outStep, } self.steps[#self.steps+1] = { - type = 'truly', + type = 'truthy', copy = true, pos = filter.finish, ref1 = blockStep, @@ -261,7 +261,7 @@ local function checkAssert(loc, node) if parent.type == 'callargs' and parent.parent.node.special == 'assert' and parent[1] == loc then - node:setTruly() + node:setTruthy() end return node end @@ -281,8 +281,8 @@ function mt:launch(callback) context.node = node end end - if step.type == 'truly' then - node:setTruly() + if step.type == 'truthy' then + node:setTruthy() elseif step.type == 'falsy' then node:setFalsy() elseif step.type == 'as' then -- cgit v1.2.3