Loader whitespace fixes.

This commit is contained in:
Ferdinand Majerech 2014-07-19 14:38:35 +02:00
parent d2fe876316
commit a50907b0bd

View file

@ -112,7 +112,7 @@ struct Loader
this(string filename) @trusted
{
name_ = filename;
try{this(new File(filename));}
try { this(new File(filename)); }
catch(StreamException e)
{
throw new YAMLException("Unable to open file " ~ filename ~
@ -201,7 +201,7 @@ struct Loader
{
try
{
scope(exit){done_ = true;}
scope(exit) { done_ = true; }
auto composer = new Composer(parser_, resolver_, constructor_);
enforce(composer.checkNode(), new YAMLException("No YAML document to load"));
return composer.getSingleNode();
@ -228,7 +228,7 @@ struct Loader
Node[] loadAll() @safe
{
Node[] nodes;
foreach(ref node; this){nodes ~= node;}
foreach(ref node; this) {nodes ~= node;}
return nodes;
}
@ -246,7 +246,7 @@ struct Loader
}
body
{
scope(exit){done_ = true;}
scope(exit) { done_ = true; }
try
{
auto composer = new Composer(parser_, resolver_, constructor_);
@ -256,7 +256,7 @@ struct Loader
{
auto node = composer.getNode();
result = dg(node);
if(result){break;}
if(result) { break; }
}
return result;
@ -275,7 +275,10 @@ struct Loader
try
{
Token[] result;
while(scanner_.checkToken()){result ~= scanner_.getToken();}
while(scanner_.checkToken())
{
result ~= scanner_.getToken();
}
return result;
}
catch(YAMLException e)
@ -291,7 +294,10 @@ struct Loader
try
{
immutable(Event)[] result;
while(parser_.checkEvent()){result ~= parser_.getEvent();}
while(parser_.checkEvent())
{
result ~= parser_.getEvent();
}
return result;
}
catch(YAMLException e)