Example #1
0
 public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
 {
     foreach (GlobalConstantDecl cd in constants)
     {
         cd.ApplyCustomAttribute(kind, attribute, selector);
     }
 }
Example #2
0
 public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
 {
     foreach (GlobalConstantDecl cd in node.Constants)
     {
         var cdcompiler = cd.NodeCompiler <IGlobalConstantDeclCompiler>();
         cdcompiler.ApplyCustomAttribute(kind, attribute, selector);
     }
 }
Example #3
0
        internal void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
        {
            switch (kind)
            {
            case SpecialAttributes.Export:
                constant.ExportInfo = (ExportAttribute)attribute;
                break;

            default:
                Debug.Fail("N/A");
                throw null;
            }
        }
Example #4
0
        public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
        {
            switch (kind)
            {
            case SpecialAttributes.Export:
                function.Builder.ExportInfo = (ExportAttribute)attribute;
                break;

            default:
                Debug.Fail("N/A");
                throw null;
            }
        }
Example #5
0
            private void ApplySpecialAttribute(Analyzer /*!*/ analyzer, SpecialAttributes kind, Attribute attribute)
            {
                switch (node.TargetSelector)
                {
                case CustomAttribute.TargetSelectors.Assembly:
                case CustomAttribute.TargetSelectors.Module:
                    analyzer.SourceUnit.CompilationUnit.ModuleBuilder.AssemblyBuilder.ApplyCustomAttribute(kind, attribute, node.TargetSelector);
                    break;

                default:
                    target.ApplyCustomAttribute(kind, attribute, node.TargetSelector);
                    break;
                }
            }
Example #6
0
        public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
        {
            Debug.Assert(selector == CustomAttribute.TargetSelectors.Default);

            switch (kind)
            {
            case SpecialAttributes.Out:
                isOut = true;
                break;

            default:
                Debug.Fail("N/A");
                throw null;
            }
        }
Example #7
0
		internal void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			switch (kind)
			{
				case SpecialAttributes.Export:
					constant.ExportInfo = (ExportAttribute)attribute;
					break;

				default:
					Debug.Fail("N/A");
					throw null;
			}
		}
Example #8
0
		public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			foreach (GlobalConstantDecl cd in constants)
				cd.ApplyCustomAttribute(kind, attribute, selector);
		}
Example #9
0
		public override void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			switch (kind)
			{
				case SpecialAttributes.Export:
					Debug.Assert(selector == CustomAttribute.TargetSelectors.Default);
					method.Builder.ExportInfo = (ExportAttribute)attribute;
					break;

				default:
					Debug.Fail("N/A");
					break;
			}
		}
Example #10
0
		public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			Debug.Assert(selector == CustomAttribute.TargetSelectors.Default);

			switch (kind)
			{
				case SpecialAttributes.Out:
					isOut = true;
					break;

				default:
					Debug.Fail("N/A");
					throw null;
			}
		}
Example #11
0
            private void ApplySpecialAttribute(Analyzer/*!*/ analyzer, SpecialAttributes kind, Attribute attribute)
            {
                switch (node.TargetSelector)
                {
                    case CustomAttribute.TargetSelectors.Assembly:
                    case CustomAttribute.TargetSelectors.Module:
                        analyzer.SourceUnit.CompilationUnit.ModuleBuilder.AssemblyBuilder.ApplyCustomAttribute(kind, attribute, node.TargetSelector);
                        break;

                    default:
                        target.ApplyCustomAttribute(kind, attribute, node.TargetSelector);
                        break;
                }
            }
Example #12
0
 public override void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
 {
     // nothing
 }
Example #13
0
		internal void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			// constant redeclared:
			if (constant == null) return;

			switch (kind)
			{
				case SpecialAttributes.Export:
					Debug.Assert(selector == CustomAttribute.TargetSelectors.Default);
					constant.ExportInfo = (ExportAttribute)attribute;
					break;

				default:
					Debug.Fail("N/A");
					break;
			}
		}
Example #14
0
		internal void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			// field redeclared:
			if (field == null) return;

			switch (kind)
			{
				case SpecialAttributes.Export:
					Debug.Assert(selector == CustomAttribute.TargetSelectors.Default);
					field.Builder.ExportInfo = (ExportAttribute)attribute;
					break;

				case SpecialAttributes.AppStatic:
					field.MemberDesc.MemberAttributes |= PhpMemberAttributes.AppStatic;
					break;

				default:
					Debug.Fail("N/A");
					throw null;
			}
		}
Example #15
0
		public override void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			foreach (FieldDecl field in fields)
				field.ApplyCustomAttribute(kind, attribute, selector);
		}
Example #16
0
		public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			Debug.Fail("N/A");
		}
Example #17
0
		public void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector)
		{
			switch (kind)
			{
				case SpecialAttributes.Export:
					function.Builder.ExportInfo = (ExportAttribute)attribute;
					break;

				default:
					Debug.Fail("N/A");
					throw null;
			}
		}
Example #18
0
		public abstract void ApplyCustomAttribute(SpecialAttributes kind, Attribute attribute, CustomAttribute.TargetSelectors selector);