public virtual void visit(IClassConstantDefinitionNode value)
 {
 }
Exemplo n.º 2
0
        public void visit(IClassConstantDefinitionNode value)
        {
            string s = value.GetType().Name + ".";
            prepare_string_node(value.name, s + "name");            
            
            prepare_up_link_node(value.comperehensive_type.name.ToString(), s + "comperehensive_type", value.comperehensive_type);

            myTreeNode from = treeView.SelectedNode.Nodes[1] as myTreeNode;
            myTreeNode to = table_subnodes[value.comperehensive_type] as myTreeNode;
            table_for_up_links.Add(from, to);


            prepare_node(value.constant_value, s + "constant_value");
            prepare_string_node(value.field_access_level.ToString(), s + "field_access_level");
            prepare_string_node(value.polymorphic_state.ToString(), s + "polymorphic_state");
            prepare_node(value.type, s + "type");                        
        }
Exemplo n.º 3
0
 public override void visit(IClassConstantDefinitionNode value)
 {
     FieldBuilder fb = null;
     if (value.type is ICompiledTypeNode && (value.type as ICompiledTypeNode).compiled_type.IsEnum)
         fb = cur_type.DefineField(value.name, TypeFactory.Int32Type, FieldAttributes.Literal | ConvertFALToFieldAttributes(value.field_access_level));
     else
         fb = cur_type.DefineField(value.name, helper.GetTypeReference(value.type).tp, FieldAttributes.Literal | ConvertFALToFieldAttributes(value.field_access_level));
     if (value.constant_value.value != null)
         fb.SetConstant(value.constant_value.value);
     else
         throw new Errors.CompilerInternalError("NetGenerator", new Exception("Invalid constant value in IClassConstantDefinitionNode"));
 }
Exemplo n.º 4
0
 public virtual void visit(IClassConstantDefinitionNode value)
 {
 }
Exemplo n.º 5
0
        public void visit(IClassConstantDefinitionNode value)
        {

            throw new System.NotSupportedException(value.GetType().ToString());
        }
Exemplo n.º 6
0
		public static string get_const_name(IClassConstantDefinitionNode c)
		{
			return get_type_name(c.comperehensive_type) + "." + c.name;
		}
Exemplo n.º 7
0
		public static bool can_write(IClassConstantDefinitionNode t)
		{
			return !(string.IsNullOrEmpty(t.Documentation) && !builder.options.ShowNoCommentedElements || t.name.Contains("$")
			        || user_doc_disabled(t.Documentation));
		}
Exemplo n.º 8
0
		public static string get_const_header(IClassConstantDefinitionNode c)
		{
			StringBuilder sb = new StringBuilder();
			string hdr = HelpUtils.extract_user_defined_header(c.Documentation);
			if (!string.IsNullOrEmpty(hdr))
			{
				sb.Append("<div>"+hdr+"</div>");
				return sb.ToString();
			}
			sb.Append("<div>");
			sb.Append(get_span_for_keyword(get_text_for_access_level(c.field_access_level))+" ");
			if (c.polymorphic_state == polymorphic_state.ps_static)
				sb.Append(get_span_for_keyword("class")+" ");
			sb.Append(get_span_for_keyword("const")+" "+get_span_for_identifier(c.name)+" : "+get_type_html_text(c.type)+" = "+get_const_value(c.constant_value));
			sb.Append("</div>");
			return sb.ToString();
		}