protected virtual void VisitTopLevelDeclaration(BoundNode node)
{
switch (node.Kind)
{
case BoundNodeKind.VariableDeclaration:
VisitVariableDeclaration((BoundVariableDeclaration) node);
break;
case BoundNodeKind.MultipleVariableDeclarations:
VisitMultipleVariableDeclarations((BoundMultipleVariableDeclarations) node);
break;
case BoundNodeKind.FunctionDeclaration:
VisitFunctionDeclaration((BoundFunctionDeclaration) node);
break;
case BoundNodeKind.FunctionDefinition:
VisitFunctionDefinition((BoundFunctionDefinition) node);
break;
case BoundNodeKind.ConstantBuffer:
VisitConstantBuffer((BoundConstantBuffer) node);
break;
case BoundNodeKind.TypeDeclaration:
VisitTypeDeclaration((BoundTypeDeclaration) node);
break;
case BoundNodeKind.Namespace:
VisitNamespace((BoundNamespace) node);
break;
case BoundNodeKind.Technique:
VisitTechnique((BoundTechnique) node);
break;
case BoundNodeKind.Typedef:
VisitTypedefStatement((BoundTypedefStatement) node);
break;
case BoundNodeKind.NoOpStatement:
VisitNoOpStatement((BoundNoOpStatement) node);
break;
case BoundNodeKind.Error:
VisitError((BoundErrorNode) node);
break;
default:
throw new InvalidOperationException(node.Kind.ToString());
}
}