mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Added support for C-style vararg methods
This commit is contained in:
parent
89e6b0d577
commit
7741344fd2
16 changed files with 129 additions and 68 deletions
|
@ -1960,6 +1960,14 @@ String BeModule::ToString(BeFunction* wantFunc)
|
|||
dc.mSeenNames[param.mName] = 0;
|
||||
str += "%" + param.mName;
|
||||
}
|
||||
|
||||
if (funcType->mIsVarArg)
|
||||
{
|
||||
if (!funcType->mParams.IsEmpty())
|
||||
str += ", ";
|
||||
str += "...";
|
||||
}
|
||||
|
||||
str += ")";
|
||||
|
||||
if (func->mAlwaysInline)
|
||||
|
@ -2917,6 +2925,14 @@ void BeModule::ToString(StringImpl& str, BeType* type)
|
|||
str += ", ";
|
||||
ToString(str, funcType->mParams[paramIdx].mType);
|
||||
}
|
||||
|
||||
if (funcType->mIsVarArg)
|
||||
{
|
||||
if (!funcType->mParams.IsEmpty())
|
||||
str += ", ";
|
||||
str += "...";
|
||||
}
|
||||
|
||||
str += ")";
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue