public override void VisitIf(IfStatement ifStmt)
{
ifStmt.Test.Accept(this);
if (ifStmt.Test.NodeType != typeManager.BoolType) {
report.Error(ifStmt.Test.Location,
"BOOL expression expected");
}
ifStmt.ThenPart.Accept(this);
if (ifStmt.ElsePart != null)
ifStmt.ElsePart.Accept(this);
}