Exemple #1
0
const wstring AstPrinter::Print(const Stmt& stmt) const
{
    int depth = this->GetDepth(stmt);
    int leadingSpaceCount = depth * TabWidth;
    wstring s;
    for (int i = 0; i < leadingSpaceCount; i++)
    {
        s += _T(" ");
    }
    s += stmt.GetName();

    // behavior;
    wcout <<s <<endl;

    return s;
}