mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
LDocGen should not crash if it cannot get the name of the parameter.
This commit is contained in:
@@ -72,6 +72,7 @@ local function ParseComments(tokens, i, object)
|
||||
local pname, pdesc = operand:match"^%s*([a-zA-Z_.]%.?%.?[a-zA-Z0-9_]*)%s*(.*)$"
|
||||
local param = object:getParameter(pname)
|
||||
if not param then
|
||||
if pname == nil then pname = "??" end -- Don't crash if first part of RE failed as well.
|
||||
error("Unknown parameter: ".. pname .." (".. tokens.__file
|
||||
.." near line ".. tokens[decl_i - 1].line ..")")
|
||||
end
|
||||
|
Reference in New Issue
Block a user