libs/web: allow zero-length string literals when parsing datatypes
This commit is contained in:
parent
9fcdf0fe81
commit
875baa244a
1 changed files with 2 additions and 2 deletions
|
@ -180,8 +180,8 @@ function compile_datatype(code)
|
|||
|
||||
if #label > 0 and tonumber(label) then
|
||||
stack[#stack+1] = tonumber(label)
|
||||
elseif label:match("^'.+'$") or label:match('^".+"$') then
|
||||
stack[#stack+1] = label:gsub("[\"'](.+)[\"']", "%1")
|
||||
elseif label:match("^'.*'$") or label:match('^".*"$') then
|
||||
stack[#stack+1] = label:gsub("[\"'](.*)[\"']", "%1")
|
||||
elseif type(datatypes[label]) == "function" then
|
||||
stack[#stack+1] = datatypes[label]
|
||||
stack[#stack+1] = { }
|
||||
|
|
Loading…
Reference in a new issue