Пример #1
0
        private void ProtoSpace(IList <Tree> nameSpace)
        {
            _byteCodeMapper.OpenNameSpace(nameSpace[0].Content);
            for (int i = 1; i < nameSpace.Count; i++)
            {
                switch (nameSpace[i].Kind)
                {
                case Kind.Class:
                case Kind.Struct:
                    ProtoClass(nameSpace[i]);
                    break;

                case Kind.Space:
                    ProtoSpace(nameSpace[i].Children);
                    break;
                }
            }
            _byteCodeMapper.CloseNameSpace();
        }
Пример #2
0
 internal void ProtoSpace(IList <Tree> nameSpace)
 {
     _byteCodeMapper.OpenNameSpace(nameSpace[0].Content);
     for (var i = 1; i < nameSpace.Count; i++)
     {
         if (nameSpace[i].Kind == Kind.Class)
         {
             ProtoClass(nameSpace[i].Children);
         }
         else if (nameSpace[i].Kind == Kind.Struct)
         {
             ProtoStruct(nameSpace[i].Children);
         }
         else
         {
             ProtoSpace(nameSpace[i].Children);
         }
     }
     _byteCodeMapper.CloseNameSpace();
 }