Fixed vararg and type formatting
This commit is contained in:
parent
ebbb1907d1
commit
6a39efba0f
|
@ -492,13 +492,13 @@ class Formatter(Sink)
|
||||||
}
|
}
|
||||||
if (parameter.type !is null)
|
if (parameter.type !is null)
|
||||||
format(parameter.type);
|
format(parameter.type);
|
||||||
if (parameter.vararg)
|
|
||||||
sink.put("...");
|
|
||||||
if (parameter.name.type != TokenType.invalid)
|
if (parameter.name.type != TokenType.invalid)
|
||||||
{
|
{
|
||||||
sink.put(" ");
|
sink.put(" ");
|
||||||
sink.put(parameter.name.value);
|
sink.put(parameter.name.value);
|
||||||
}
|
}
|
||||||
|
if (parameter.vararg)
|
||||||
|
sink.put(" ...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void format(Parameters parameters)
|
void format(Parameters parameters)
|
||||||
|
@ -685,7 +685,7 @@ class Formatter(Sink)
|
||||||
bool first = true;
|
bool first = true;
|
||||||
foreach (constructor; type.typeConstructors)
|
foreach (constructor; type.typeConstructors)
|
||||||
{
|
{
|
||||||
if (!first)
|
if (first)
|
||||||
sink.put(" ");
|
sink.put(" ");
|
||||||
first = false;
|
first = false;
|
||||||
sink.put(getTokenValue(constructor));
|
sink.put(getTokenValue(constructor));
|
||||||
|
|
Loading…
Reference in New Issue