public void LoadAndExecute(Machine machine)
{
string blocktext;
blocktext = this.GetBlockText();
while (blocktext != null)
{
bool isprocessor = false;
string trimmed = blocktext.Trim();
if (trimmed.StartsWith("!"))
{
trimmed = trimmed.Substring(1);
isprocessor = true;
}
if (String.IsNullOrEmpty(trimmed))
{
blocktext = this.GetBlockText();
continue;
}
Block block = this.compiler.CompileBlock(trimmed);
var value = block.Execute(machine, null);
if (isprocessor)
((ChunkReaderProcessor)value).Process(this.reader, machine, this.compiler);
blocktext = this.GetBlockText();
}
this.reader.Close();
this.reader = null;
}