private ICommand ParseIfCommand()
{
this.Parse(TokenType.Delimiter, "(");
IExpression condition = this.ParseExpression();
this.Parse(TokenType.Delimiter, ")");
ICommand thencmd = this.ParseCommand();
if (!this.TryParse(TokenType.Name, "else"))
return new IfCommand(condition, thencmd);
this.lexer.NextToken();
ICommand elsecmd = this.ParseCommand();
return new IfCommand(condition, thencmd, elsecmd);
}