• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# CSharp.ConstInitializer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.CSharp.ConstInitializer的典型用法代码示例。如果您正苦于以下问题:C# ConstInitializer类的具体用法?C# ConstInitializer怎么用?C# ConstInitializer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ConstInitializer类属于Mono.CSharp命名空间,在下文中一共展示了ConstInitializer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Const

        public Const(DeclSpace parent, FullNamedExpression type, string name,
            Expression expr, Modifiers mod_flags, Attributes attrs, Location loc)
            : base(parent, type, mod_flags, AllowedModifiers,
				new MemberName (name, loc), attrs)
        {
            if (expr != null)
                initializer = new ConstInitializer (this, expr);

            ModFlags |= Modifiers.STATIC;
        }
开发者ID:speier,项目名称:shake,代码行数:10,代码来源:const.cs


示例2: Visit

			public override object Visit (ConstInitializer constInitializer)
			{
				return new Identifier (constInitializer.Name, Convert (constInitializer.Location));
			}
开发者ID:pgoron,项目名称:monodevelop,代码行数:4,代码来源:CSharpParser.cs


示例3: Visit

			public override object Visit(ConstInitializer constInitializer)
			{
				return constInitializer.Expr.Accept(this);
			}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:4,代码来源:CSharpParser.cs


示例4: case_144

void case_144()
#line 1253 "cs-parser.jay"
{
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:segaman,项目名称:NRefactory,代码行数:7,代码来源:cs-parser.cs


示例5: Visit

		public virtual object Visit (ConstInitializer constInitializer)
		{
			return null;
		}
开发者ID:KAW0,项目名称:Alter-Native,代码行数:4,代码来源:visit.cs


示例6: case_132

void case_132()
#line 1061 "cs-parser.jay"
{
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
开发者ID:Ein,项目名称:monodevelop,代码行数:6,代码来源:cs-parser.cs


示例7: FixedField

 public FixedField(DeclSpace parent, FullNamedExpression type, Modifiers mod, string name,
     Expression size_expr, Attributes attrs, Location loc)
     : base(parent, type, mod, AllowedModifiers, new MemberName (name, loc), attrs)
 {
     initializer = new ConstInitializer (this, size_expr);
 }
开发者ID:speier,项目名称:shake,代码行数:6,代码来源:field.cs


示例8: case_138

void case_138()
{
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:6,代码来源:cs-parser.cs


示例9: case_113

void case_113()
{
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
开发者ID:animaonline,项目名称:Portable-Mono.CSharp,代码行数:5,代码来源:cs-parser.cs


示例10: yyparse


//.........这里部分代码省略.........
		lbag.AppendToMember (current_class, GetLocation (yyVals[-5+yyTop]), GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
		yyVal = pop_current_class ();
	  }
  break;
case 104:
#line 947 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		Error_SyntaxError (yyToken);
	  }
  break;
case 105:
#line 956 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[0+yyTop];
		var mod = (Modifiers) yyVals[-3+yyTop];
		current_field = new Const (current_class, (FullNamedExpression) yyVals[-1+yyTop], mod, new MemberName (lt.Value, lt.Location), (Attributes) yyVals[-4+yyTop]);
		current_container.AddConstant ((Const) current_field);
		
		if ((mod & Modifiers.STATIC) != 0) {
			report.Error (504, current_field.Location, "The constant `{0}' cannot be marked static", current_field.GetSignatureForError ());
		}
		
		yyVal = current_field;
	  }
  break;
case 106:
#line 969 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
			Lexer.doc_state = XmlCommentState.Allowed;
		}
		
		current_field.Initializer = (ConstInitializer) yyVals[-2+yyTop];
		lbag.AddMember (current_field, mod_locations, GetLocation (yyVals[-6+yyTop]), GetLocation (yyVals[0+yyTop]));
		current_field = null;
	  }
  break;
case 117:
#line 1003 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
         yyVal = yyVals[0+yyTop];
      }
  break;
case 118:
#line 1007 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
        yyVal = new SimpleName("dynamic",new Location(0,0));
      }
  break;
case 119:
#line 1013 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
	  	lexer.parsing_generic_declaration = false;
	  	var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
		FullNamedExpression type = yyVals[0+yyTop] as FullNamedExpression;
        if(type == null){
           report.Error (10008, GetLocation (yyVals[0+yyTop]), "Could not resolve type expression");
        }

		current_field = new RoleField (current_class, type, Modifiers.PRIVATE | Modifiers.ROLE, new MemberName (lt.Value, lt.Location),null);
		current_container.AddField (current_field);
		yyVal = current_field;
	  
		if (doc_support) {
			current_field.DocComment = Lexer.consume_doc_comment ();
开发者ID:runefs,项目名称:Marvin,代码行数:67,代码来源:cs-parser.cs


示例11: case_155

void case_155()
#line 1209 "C:\Projects\Junk\mono\mcs\class\Mono.CSharp\..\..\mcs\cs-parser.jay"
{
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[-1+yyTop], GetLocation (yyVals[-3+yyTop]));
		lbag.AddLocation (yyVal, GetLocation (yyVals[0+yyTop]));
	  }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:7,代码来源:cs-parser.cs



注:本文中的Mono.CSharp.ConstInitializer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# CSharp.Constant类代码示例发布时间:2022-05-26
下一篇:
C# CSharp.Const类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap