Beispiel #1
0
        public void CreateBlock(AstBlockBase block, Namescope parent, IEnumerable <AstBlockMember> parentItems)
        {
            if (!_env.Test(block.Name.Source, block.OptionalCondition))
            {
                return;
            }

            switch (block.MemberType)
            {
            case AstMemberType.Class:
                _typeBuilder.CreateClass((AstClass)block, parent, parentItems);
                break;

            case AstMemberType.Delegate:
                _typeBuilder.CreateDelegate((AstDelegate)block, parent);
                break;

            case AstMemberType.Enum:
                _typeBuilder.CreateEnum((AstEnum)block, parent);
                break;

            case AstMemberType.Block:
                _blockBuilder.CreateBlock((AstBlock)block, parent);
                break;
            }
        }