當前位置: 首頁>>代碼示例>>C#>>正文


C# FieldBase.AddDeclarator方法代碼示例

本文整理匯總了C#中Mono.CSharp.FieldBase.AddDeclarator方法的典型用法代碼示例。如果您正苦於以下問題:C# FieldBase.AddDeclarator方法的具體用法?C# FieldBase.AddDeclarator怎麽用?C# FieldBase.AddDeclarator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Mono.CSharp.FieldBase的用法示例。


在下文中一共展示了FieldBase.AddDeclarator方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: yyparse


//.........這裏部分代碼省略.........
                                              Modifiers.PUBLIC | Modifiers.STATIC, 
                                              null);
        }
        RoleContracts.Add(contractName,inter);
		push_current_class (inter, null);
		lbag.AddMember (current_class, mod_locations, GetLocation (yyVals[0+yyTop]));		
	}
  break;
case 123:
#line 1081 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_declaration;	  
		if (doc_support)
			Lexer.doc_state = XmlCommentState.Allowed;
	    lbag.AppendToMember (current_class, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
        if(current_extensionContainer != null) {
            var cls = current_class;
            var container = current_container;
            current_container = current_class.Module;
            push_current_class((Class)current_extensionContainer, null);
            lbag.AddMember (current_extensionContainer, mod_locations, GetLocation (yyVals[-4+yyTop]));	
            lbag.AppendToMember (current_extensionContainer, GetLocation (yyVals[-2+yyTop]), GetLocation (yyVals[0+yyTop]));
            pop_current_class();
            current_class = cls;
            current_container = container;
	        current_extensionContainer = null;
        }
		yyVal = pop_current_class ();
	  }
  break;
case 124:
#line 1104 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 125:
#line 1108 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		current_field.AddDeclarator ((FieldDeclarator) yyVals[0+yyTop]);
	  }
  break;
case 126:
#line 1115 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		var lt = (Tokenizer.LocatedToken) yyVals[-1+yyTop];
	  	yyVal = new FieldDeclarator (new SimpleMemberName (lt.Value, lt.Location), (ConstInitializer) yyVals[0+yyTop]);
	  	lbag.AddLocation (yyVal, GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 127:
#line 1124 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		++lexer.parsing_block;
	  }
  break;
case 128:
#line 1128 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
		--lexer.parsing_block;
		yyVal = new ConstInitializer (current_field, (Expression) yyVals[0+yyTop], GetLocation (yyVals[-2+yyTop]));
	  }
  break;
case 129:
#line 1133 "D:\GitHub\M\Marvin\mcs\cs-parser.jay"
  {
開發者ID:runefs,項目名稱:Marvin,代碼行數:67,代碼來源:cs-parser.cs


注:本文中的Mono.CSharp.FieldBase.AddDeclarator方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。