コード例 #1
0
void PrintVisitor::visit(const AstIf &ref)
{
	cout << "AstIf<Condition="; ref.GetCondition()->accept(*this);
	cout << "; Consequent="; ref.GetConsequent()->accept(*this);

	if (ref.HasElse())
	{
		cout << "; Alternative="; ref.GetAlternative()->accept(*this);
	}

	cout << ">\n";
}