Пример #1
0
        public override void Observe(VHDLCompilerInterface compiler)
        {
            compiler.TypeDictionary.AddItem(type, type.Identifier);

            if (BuiltInTypesDictionary.ContainsBuiltInSubType(type))
            {
                return;
            }

            ISubtypeIndication si       = type.SubtypeIndication;
            string             typeName = type.Identifier;

            if (si is RangeSubtypeIndication)
            {
                RangeSubtypeIndication rangeSI = si as RangeSubtypeIndication;
                ISubtypeIndication     baseSI  = rangeSI.BaseType;
                if (baseSI is VHDL.type.IntegerType)
                {
                    ObserveIntegerSubType(compiler, rangeSI, typeName);
                }

                if (baseSI is VHDL.type.RealType)
                {
                    ObserveRealSubType(compiler, rangeSI, typeName);
                }
            }
        }
Пример #2
0
        public override void Observe(VHDLCompilerInterface compiler)
        {
            compiler.TypeDictionary.AddItem(type, type.Identifier);

            if (BuiltInTypesDictionary.ContainsBuiltInType(type))
            {
                return;
            }

            if (type is VHDL.type.IntegerType)
            {
                VHDL.type.IntegerType intType = type as VHDL.type.IntegerType;
                ObserveIntegerType(compiler, intType);
                return;
            }

            if (type is VHDL.type.RealType)
            {
                VHDL.type.RealType realType = type as VHDL.type.RealType;
                ObserveFloatingPointType(compiler, realType);
                return;
            }

            if (type is VHDL.type.EnumerationType)
            {
                VHDL.type.EnumerationType enumType = type as VHDL.type.EnumerationType;
                ObserveEnumerationType(compiler, enumType);
                return;
            }

            if (type is VHDL.type.PhysicalType)
            {
                VHDL.type.PhysicalType physType = type as VHDL.type.PhysicalType;
                ObserveEnumerationType(compiler, physType);
                return;
            }
        }