Exemplo n.º 1
0
bool ASTPrinter::visit(Assignment const& _node)
{
	writeLine(string("Assignment using operator ") + Token::toString(_node.assignmentOperator()));
	printType(_node);
	printSourcePart(_node);
	return goDeeper();
}
Exemplo n.º 2
0
bool Why3Translator::visit(Assignment const& _node)
{
	if (_node.assignmentOperator() != Token::Assign)
		error(_node, "Compound assignment not supported.");

	_node.leftHandSide().accept(*this);

	add(m_currentLValueIsRef ? " := " : " <- ");
	_node.rightHandSide().accept(*this);

	return false;
}