Fixed vararg and type formatting

This commit is contained in:
Hackerpilot 2013-09-10 22:47:35 -07:00
parent ebbb1907d1
commit 6a39efba0f
1 changed files with 3 additions and 3 deletions

View File

@ -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));