예제 #1
0
 protected virtual void Visit(NamespaceBlock namespaceBlock)
 {
     WriteLinkLine(namespaceBlock);
     Write("namespace ").Write(namespaceBlock.Name);
     OpenBrace();
     foreach (Node node in namespaceBlock.Body)
     {
         VisitDynamic(node);
     }
     CloseBrace();
 }
예제 #2
0
 private void FixShaderClassTypeWithNoNameSpace()
 {
     for (int i = 0; i < shader.Declarations.Count; i++)
     {
         var node = shader.Declarations[i];
         if (node is ShaderClassType)
         {
             var nameSpaceBlock = new NamespaceBlock(DefaultNameSpace);
             nameSpaceBlock.Body.Add(node);
             shader.Declarations[i] = nameSpaceBlock;
         }
     }
 }