chromium/third_party/angle/src/compiler/translator/OutputTree.cpp

//
// Copyright 2002 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//

#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_util/IntermTraverse.h"

namespace sh
{

namespace
{

void OutputFunction(TInfoSinkBase &out, const char *str, const TFunction *func)
{}

// Two purposes:
// 1.  Show an example of how to iterate tree.  Functions can also directly call traverse() on
//     children themselves to have finer grained control over the process than shown here, though
//     that's not recommended if it can be avoided.
// 2.  Print out a text based description of the tree.

// The traverser subclass is used to carry along data from node to node in the traversal.
class TOutputTraverser : public TIntermTraverser
{};

//
// Helper functions for printing, not part of traversing.
//
void OutputTreeText(TInfoSinkBase &out, TIntermNode *node, const int depth)
{}

//
// The rest of the file are the traversal functions.  The last one
// is the one that starts the traversal.
//
// Return true from interior nodes to have the external traversal
// continue on to children.  If you process children yourself,
// return false.
//

void TOutputTraverser::visitSymbol(TIntermSymbol *node)
{}

bool TOutputTraverser::visitSwizzle(Visit visit, TIntermSwizzle *node)
{}

bool TOutputTraverser::visitBinary(Visit visit, TIntermBinary *node)
{}

bool TOutputTraverser::visitUnary(Visit visit, TIntermUnary *node)
{}

bool TOutputTraverser::visitFunctionDefinition(Visit visit, TIntermFunctionDefinition *node)
{}

bool TOutputTraverser::visitGlobalQualifierDeclaration(Visit visit,
                                                       TIntermGlobalQualifierDeclaration *node)
{}

void TOutputTraverser::visitFunctionPrototype(TIntermFunctionPrototype *node)
{}

bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate *node)
{}

bool TOutputTraverser::visitBlock(Visit visit, TIntermBlock *node)
{}

bool TOutputTraverser::visitDeclaration(Visit visit, TIntermDeclaration *node)
{}

bool TOutputTraverser::visitTernary(Visit visit, TIntermTernary *node)
{}

bool TOutputTraverser::visitIfElse(Visit visit, TIntermIfElse *node)
{}

bool TOutputTraverser::visitSwitch(Visit visit, TIntermSwitch *node)
{}

bool TOutputTraverser::visitCase(Visit visit, TIntermCase *node)
{}

void TOutputTraverser::visitConstantUnion(TIntermConstantUnion *node)
{}

bool TOutputTraverser::visitLoop(Visit visit, TIntermLoop *node)
{}

bool TOutputTraverser::visitBranch(Visit visit, TIntermBranch *node)
{}

}  // anonymous namespace

void OutputTree(TIntermNode *root, TInfoSinkBase &out)
{}

}  // namespace sh