From dca751cf110a96a351c8cadc049ac364dc41a4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 18 Jul 2022 01:07:30 +0800 Subject: #1255 diagnostic for enum --- script/vm/compiler.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'script/vm/compiler.lua') diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index d94dd1f4..04a4f0c5 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -32,10 +32,6 @@ local function bindDocs(source) vm.setNode(source, vm.compileNode(doc)) return true end - if doc.type == 'doc.enum' then - vm.setNode(source, vm.compileNode(doc)) - return true - end if doc.type == 'doc.param' then local node = vm.compileNode(doc) if doc.optional then @@ -1586,6 +1582,10 @@ local compilerSwitch = util.switch() : call(function (source) vm.setNode(source, vm.compileNode(source.parent)) end) + : case 'doc.enum.name' + : call(function (source) + vm.setNode(source, vm.compileNode(source.parent)) + end) : case 'doc.field' : call(function (source) if not source.extends then -- cgit v1.2.3