pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.6k stars 519 forks source link

error in analyse #1117

Closed qgenesist closed 3 years ago

qgenesist commented 3 years ago

W 10 64 bit ZB 1.90 (9 Feb 2020)

function matDTAREF(eptr) local REF = '' local riptr = fhNewItemPtr() local piptr = fhNewItemPtr()

riptr:MoveToRecordItem(eptr) local RLBL = fhGetTag(riptr) piptr:MoveToParentItem(eptr) local PLBL = fhGetTag(piptr)

local LBL = fhGetTag(eptr)

if RLBL ~= PLBL and PLBL ~= '' then -- ie: INDI.BIRT.DAT REF = string.format('%s.%s.%s', RLBL, PLBL, LBL) break elseif RLBL == PLBL then

-- ie: INDI.INDI.NAME
REF = string.format('%s.%s', RLBL, LBL)
break

elseif PLBL == '' then -- ie: INDI..INDI REF = string.format('%s', RLBL) end

-- local rc, ilvl, sGCTAG, imin, imax, imaxsiz, imaxCONT, imaxCONC = fhGetGedcomInfo(eptr) if not DTAREF[REF] then local vr = fhIsValidDataRef(REF) local pi = fhHasParentItem(eptr) local ci = fhHasChildItem(eptr) local ps = fhHasPrevSibItem(eptr) local ns = fhHasNextSibItem(eptr) local hf = fhIsHidden(eptr) local uf = fhIsUDF(eptr) DTAREF[REF] = {REF = REF, vr = vr, pi = pi, ci = ci, ps = ps, ns = ns, hf = hf, uf = uf} end return end

I put this in its own untitled scratch to verify--

using analyze I get: Untitled

pkulchenko commented 3 years ago

@qgenesist, this appears to be a duplicate of #1095 and fixed in 97b1ae125, so you may want to use a newer version.