unparse.cpp
/*
In this code, the intention is that functions are grouped 
into files by purpose, rather than by class.
If you're used to having all of the functions of a class 
defined in the same file, this style may be a bit disorienting,
though it is legal. Thus, we can have
ProgramNode::unparse, which is the unparse method of ProgramNodes
defined in the same file as DeclNode::unparse, the unparse method
of DeclNodes.
*/
In this code, the intention is that functions are grouped
into files by purpose, rather than by class.
If you're used to having all of the functions of a class
defined in the same file, this style may be a bit disorienting,
though it is legal. Thus, we can have
ProgramNode::unparse, which is the unparse method of ProgramNodes
defined in the same file as DeclNode::unparse, the unparse method
of DeclNodes.
In this code the intention is that functions are grouped into files by purpose rather than by class . If you ' re used to having all of the functions of a class defined in the same file this style may be a bit disorienting though it is legal . Thus we can have ProgramNode :: unparse which is the unparse method of ProgramNodes defined in the same file as DeclNode :: unparse the unparse method of DeclNodes .
void ProgramNode::unparse(std::ostream &out, int indent)
{
	for (auto global : *_globals) {
		global->unparse(out, indent);
	}
}
void ProgramNode :: unparse ( std :: ostream & out , int indent ) { for ( auto global : * _globals ) { global -> unparse ( out , indent ) ; } }
In this code, the intention is that functions are grouped
into files by purpose, rather than by class.
In this code the intention is that functions are grouped into files by purpose rather than by class .